On Commit - errors in called script

Smith Bill Bill.Smith at uk.fujitsu.com
Thu Dec 8 12:19:40 UTC 2011



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????




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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20111208/203c5463/attachment.html>

More information about the dhcp-users mailing list