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

Re: Modem Gateway



On Thu, 25 Jul 2002 11:58, Dan wrote:
> I have only tried: start and restart not stop.
>
> I copied the scripts directly from your email.

  This may have caused a problem in the firewall script, Crispin said that 
some of the lines had been automatically wrapped onto the next line by his 
mail program.

> I had a problem running the command
> chmod a+x /ect/init.d/firewall

  Should it have been /etc/init.d/firewall ?

> so I started up mc ( Midnight Commander ) and used that to
> cd my way to /ect/init.d and ran chmod a+x firewall
> that worked because Midnight Commander showed me the atributes changed.
>
> same thing with /ect/firewall.conf

>
> I tried running the script like this
> Whatever-directory#/ect/init.d/firewall start
> and like this
> /ect/init.d# firewall start <enter>
> bash: firewall: command not found

  try ./firewall start <enter>
  This should work, because your working directory is '/etc/init.d'. The './' 
part of it specifies to run the command from the current working directory. 
Without that it tries to execute the command from one of the locations in 
your PATH environment variable. This will not contain the /etc/init.d 
directory. (Do an #echo $PATH <enter> to see what it does contain)

>
> What happened? Is their a way to "debug" or step through the lines of a
> script to see at what point it does not work?

  Yes, edit the script and put in lots of echo commands. I think there may be 
some other ways as well, read the man page for sh, and search for 'set'. (But 
there might not be as well, I haven't done a lot of shell programming)

>
> Does the first line of the file /ect/firewall.conf needs to have a:
>
> #!/bin/sh

  Yes, this tells the exec() call how to run the command, that it needs to 
invoke the /bin/sh program to run the file.

  Geoff


-- 
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: