3 Sep 2004 21:36
dhclient-script unable to output messages (3.6 pre)
Brad Ely <elyb328 <at> apk.net>
2004-09-03 19:36:39 GMT
2004-09-03 19:36:39 GMT
The dhclient-script tries to echo informational messages in a couple of
places, but they are currently going unseen.
$ grep echo /sbin/dhclient-script
echo "search $new_domain_name" >>/etc/resolv.conf.std
echo "nameserver $nameserver" >>/etc/resolv.conf.std
echo "New Network Number: $new_network_number"
echo "New Broadcast Address: $new_broadcast_address"
If I leave stdout open in fork_privchld, the messages appear again (but
still not in the daemon log file).
Index: dhclient.c
===================================================================
RCS file: /data2/obsd-cvs/src/sbin/dhclient/dhclient.c,v
retrieving revision 1.58
diff -u -r1.58 dhclient.c
--- dhclient.c 30 Aug 2004 07:43:32 -0000 1.58
+++ dhclient.c 3 Sep 2004 18:49:22 -0000
<at> <at> -2351,7 +2351,7 <at> <at>
setproctitle("%s [priv]", ifi->name);
dup2(nullfd, STDIN_FILENO);
- dup2(nullfd, STDOUT_FILENO);
+ /* dup2(nullfd, STDOUT_FILENO); */
dup2(nullfd, STDERR_FILENO);
close(nullfd);
close(fd2);
--
Brad Ely
RSS Feed