[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: boot scripts



Thanks to all for the boot script tips. I have it up and running now... and I 
move it to /usr/local/bin (good advice).

On Tuesday 30 July 2002 03:08 pm, Colin Watson wrote:
> On Tue, Jul 30, 2002 at 11:17:43AM -0400, R. Bradley Tilley wrote:
> > This adds the script nicely, but it fails to start the script with a
> > "Unable to start /usr/bin/firewall.sh: Exec format error"
>
> Sounds like you need to put a line like this as the first line of your
> script:
>
>   #! /bin/sh
>
> You might also want to put locally written scripts in /usr/local/bin
> rather than /usr/bin to guarantee that the packaging system won't
> overwrite them.
>
> > The script can be started manually from the command line with
> > "firewall.sh start" I should point out that this is just a plain text
> > file with iptable rules. It has no code.
>
> iptables rules *are* code - they constitute a shell script. When you're
> running it from an interactive shell, the shell guesses that it's a
> shell script if it can't execute it any other way, which is why it works
> when you run it by hand. To make it work properly when started in other
> ways, though, you need the #! line above.
>
> Cheers,

-- 

Richard B. Tilley (Brad), System Administrator & Web Developer
University of Virginia Tech, Office of the University Bursar
Phone: 540.231.6277
Fax: 540.231.3238
Web: http://bursar.vt.edu



Reply to: