[wplug] IPCop script

Bob Schmertz rschmertz at speakeasy.net
Mon Jun 16 15:52:59 EDT 2003


Vanco, Donald incurred the wrath of Bob on Jun 16, by saying

>Arnaud wrote:
>> No, it was composed in Vi.
>
>	Another possibly stupid question - but this script is known to work
>with the version of icop you have?  The scripts referenced in /etc/rc.d do
>exists and are executable?  What happens if you fire them off on their own?

This looks like the source of the problem to me.  I would throw echo
debugging statements before and after those two /etc/rc.d scripts are
called, and I bet one of them has a syntax error within it, or perhaps
needs to replace a

   [ "$FOO" = "blah" ]

with a

   [ "x$FOO" = "xblah" ]

or something like that.

[snip]
>>> 
>>> #!/bin/sh
>>> 
>>> ping -c1 `netstat -rn | grep ^0.0.0.0 | awk '{print $2}'`
>>> 
>>> if [ "$?" != "0" ] ; then
>>> 	/etc/rc.d/netaddress.down
>>> 	/etc/rc.d/netaddress.up
>>> fi
>>> 
>>> I copied this script from ipcop's archives. When I run it manually,
>>> the packet goes out, I get the reply, and then I get the error:
>>> 
>>> /usr/local/sbin/checkconnect: [: missing ']'
>>> 
>>> Any ideas where I messed up the syntax?
>> 

-- 
Cheers,
Bob Schmertz




More information about the wplug mailing list