Re: she-bang in non-executable scripts

Tom Eastep
Wed, 03 Aug 2011 13:05:54 -0000

On Wed, 2011-08-03 at 12:27 +0200, Togan Muftuoglu wrote:

>
> Is there any reason why you copy ifupdown scripts in the %post section
> of shorewall-init.spec. Why not list them in the %files section?

The ifupdown script must be installed in a different location, depending
on the distribution (and version of the distribution). In your case, you
can include it in the %files section.

>
>
> The following files have the she-bang yet they are installed
> non-executable. Is it Ok to remove the she-bang from them
>
> /usr/share/shorewall/prog.header*
> /usr/share/shorewall/lib.*
> /usr/share/shorewall6/lib.*
> /usr/share/shorewall-lite/lib.*
> /usr/share/shorewall6-lite/lib.*
> /etc/shorewall/scfilter
> /etc/shorewall6/scfilter
> /usr/share/shorewall/configfiles/scfilter
> usr/share/shorewall6/configfiles/scfilter

The prog.header* files become the first part of the compiled script, so
must contain ''#!''.

It can be removed from the lib.* files. I have it there primarily to
cause Emacs to automatically choose shell mode when I edit the files.

Currently, the function ''show_connection_filter()''
(*/lib.cli), depends
on the ''#!'' in an scfilter.

-Tom
--