> On an embedded platform I'm trying to establish why dhclient is
> returning an exit code of 143 when apparently successfully obtaining a
> leased IP. Can anyone point me to a table of dhclient's exit codes
> and their meanings?
I think most people read multiple Linux groups, there really is no need
to spam them with the same message.
A tool exiting with something else than 0 will mean something didn't go as
planed. To see what different error codes mean, check then source code if you
can't find it in the man page.
--
//Aho
However, I guess it's going to come down to that. Where can I find
the source?
On Mon, 14 Mar 2011 05:47:53 +0100, "J.O. Aho" <us...@example.net>
wrote:
>
> A tool exiting with something else than 0 will mean something didn't go as
> planed. To see what different error codes mean, check then source code if you
> can't find it in the man page.
--
> On an embedded platform I'm trying to establish why dhclient is
> returning an exit code of 143 when apparently successfully obtaining a
> leased IP. Can anyone point me to a table of dhclient's exit codes
> and their meanings?
143 corresponds to SIGTERM, as the exit status of any program, not just
dhclient. The ISC DHCP client at least will send a SIGTERM to other
instances of itself.
No, you shouldn't. Demand your money back.
> Exit codes ought to be part of the documentation as standard.
Yes, they should. Submit a patch when you've solved your problem.
> Where can I find the source?
You received the source or a written offer of it with the binary. If
you no longer have that Google can find it for you. We can help if you
tell us the exact package name and version.
--
John Hasler
jha...@newsguy.com
Dancing Horse Hill
Elmwood, WI USA
So the theory would go that because I was running ...
service network restart
... there was already an instance of dhclient running, whereas when
the device boots from scratch, there won't be, and the subsequent
script will complete properly.
I can test that theory ...
bash-3.2# ps aux | grep dhclient
root 1199 ... /sbin/dhclient ...
root 2471 ... grep dhclient ...
bash-3.2# kill 1199
bash-3.2# service network restart
Shutting down interface eth0: OK ]
Shutting down loopback interface: OK ]
Bringing up loopback interface: OK ]
Bringing up interface eth0:
Determining IP information for
eth0.../etc/sysconfig/network-scripts/ifup-eth: l
ine 296: 2805 Terminated /sbin/dhclient ${DHCLIENTARGS}
${DEVICE}
failed.
FAILED]
Bummer! It sounded so reasonable too ...
But, even if that had been the case, that would still have meant the
script that calls dhclient was buggy, because there already being an
instance running is not really a failure, is it, so surely the script
should continue? The relevant code segment reads ...
if /sbin/dhclient ${DHCLIENTARGS} ${DEVICE} ; then
echo $" done."
else
echo $" failed."
exit 1
fi
... where the variables being used in the command-line appear to have
sensible values.
On Mon, 14 Mar 2011 12:02:19 +0000, Richard Kettlewell
<r...@greenend.org.uk> wrote:
>
> 143 corresponds to SIGTERM, as the exit status of any program, not just
> dhclient. The ISC DHCP client at least will send a SIGTERM to other
> instances of itself.
--