[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

dhclient-script unable to output messages (3.6 pre)

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
@@ -2351,7 +2351,7 @@
 	setproctitle("%s [priv]", ifi->name);
 	dup2(nullfd, STDIN_FILENO);
-	dup2(nullfd, STDOUT_FILENO);
+	/* dup2(nullfd, STDOUT_FILENO); */
 	dup2(nullfd, STDERR_FILENO);

Brad Ely