On Thursday, February 03, 2011 2:00 PM, Denys Vlasenko wrote:
[...snip...]
return -1; <===== we do not wait for child!
}
return pid;
}
This only happens if exec fails.
I want to confirm that bug indeed happens exactly here.
Can you run "strace -tt -f -s99 -oLOG -p <pid of udhcpc>"
Thanks, the log is attached.But, I can also confirm that somehow the script at /usr/share/udhcpc/default.script had lost its execute permissions. Re-enabling execute permissions for this file has solved the problems I have been seeing and I think this confirms your diagnosis!
On a different topic but still related to udhcpc, is it possible to run the external script on shutdown of udhcpc? I was thinking something along the lines of this patch to the end of udhcpc_main:
--- dhcpc.c
+++ dhcpc.c
@@ -1311,6 +1311,9 @@
ret0:
retval = 0;
ret:
+ /* call script to perform shutdown operations */
+ udhcp_run_script(NULL, "shutdown");
+
/*if (client_config.pidfile) - remove_pidfile has its own check */
remove_pidfile(client_config.pidfile);
return retval;
Would this be the best way to do it? The reason I ask is so that I can
trigger a log/GUI event when udhcpc terminates. Doing this event from
deconfig is not ideal since this is called in multiple places and not just
on shutdown.
Thanks Andy
log3.tar.gz
Description: Binary data
_______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
