Source-Changes-HG archive

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

[src/trunk]: src/etc/rc.d Don't warn about $hostname not being set if $dhclie...



details:   https://anonhg.NetBSD.org/src/rev/9554e41aeb12
branches:  trunk
changeset: 485441:9554e41aeb12
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Fri Apr 28 00:13:39 2000 +0000

description:
Don't warn about $hostname not being set if $dhclient == YES; it's quite
likely that we'll be getting the hostname via DHCP when it runs.

diffstat:

 etc/rc.d/network |  10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r a271174be42b -r 9554e41aeb12 etc/rc.d/network
--- a/etc/rc.d/network  Fri Apr 28 00:08:51 2000 +0000
+++ b/etc/rc.d/network  Fri Apr 28 00:13:39 2000 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: network,v 1.7 2000/04/20 02:12:04 itojun Exp $
+# $NetBSD: network,v 1.8 2000/04/28 00:13:39 thorpej Exp $
 #
 
 # PROVIDE: network
@@ -29,7 +29,13 @@
                echo "Hostname: $hostname"
                hostname $hostname
        else
-               warn "\$hostname not set."
+               # Don't warn about it if we're going to run
+               # DHCP later, as we will probably get the
+               # hostname at that time.
+               #
+               if ! checkyesno dhclient
+                       warn "\$hostname not set."
+               fi
        fi
 
        # Check $domainname first, then /etc/defaultdomain,



Home | Main Index | Thread Index | Old Index