On Commit - errors in called script

Glenn Satchell glenn.satchell at uniq.com.au
Thu Dec 8 12:38:24 UTC 2011


ok, so in the script called by on commit, is the output of Klist the
expected result? Is there a different $PATH setting taking place perhaps?
I always set $PATH inside my scripts so they will work without depending
on the environment they are called from.

Perhaps add something like this to the script to see if you're getting the
output you expect?

Klist >/tmp/klist.txt 2>&1

regards,
-glenn

> Hi
>
>
>
> I am using the 'on commit' statement to call a bash script; he script
> has the following line:
>
>
>
> Klist | grep DHCPTEST.COM > /dev/null
>
>
>
> Now I know that DHCPTEST.COM exists in output from the klist command so
> I know that grep will return true (i.e. $? Will equal 0) and, when the
> script is run from the command promt, $? Is indeed set to 0.
>
>
>
> However, when the script is called from the DHCPD.CONF file via the 'on
> commit' statement, the result of the same line is false (i.e. $? Is 1).
>
>
>
> Why the change of behaviour????
>
>
>
> Regards
>
>
>
> Bill Smith
>
> Senior Solutions Architect
>
> Architecture & Design H&NS North
>
> Fujitsu Services
>
> Tel: 07867 821165
>
> Email:bill.smith at uk.fujitsu.com
>
>
>
>
>
>
> Unless otherwise stated, this email has been sent from Fujitsu Services
> Limited, from Fujitsu (FTS) Limited, or from Fujitsu Telecommunications
> Europe Limited, together "Fujitsu".
>
> This email is only for the use of its intended recipient.  Its contents
> are subject to a duty of confidence and may be privileged.  Fujitsu does
> not guarantee that this email has not been intercepted and amended or that
> it is virus-free.
>
> Fujitsu Services Limited, registered in England No 96056, registered
> office 22 Baker Street, London W1U 3BW.
>
> Fujitsu (FTS) Limited, registered in England No 03808613, registered
> office 22 Baker Street, London W1U 3BW.
>
> Fujitsu Telecommunications Europe Limited, registered in England No
> 2548187, registered office Solihull Parkway, Birmingham Business Park,
> Birmingham, B37 7YU._______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users





More information about the dhcp-users mailing list