Browse Source

only try to set hostname to what /etc/myname says if that file actually exists,

otherwise preserve `hostname`
netbooted machines can live perfectly fine without it; they get their hostname
earlier.
ok krw@ cedric@
OPENBSD_3_4
henning 21 years ago
parent
commit
eb7282af99
1 changed files with 8 additions and 3 deletions
  1. +8
    -3
      src/etc/netstart

+ 8
- 3
src/etc/netstart View File

@ -1,6 +1,6 @@
#!/bin/sh -
#
# $OpenBSD: netstart,v 1.86 2003/02/16 23:25:40 krw Exp $
# $OpenBSD: netstart,v 1.87 2003/08/27 11:49:36 henning Exp $
# Returns true if $1 contains only alphanumerics
isalphanumeric() {
@ -175,8 +175,13 @@ fi
# Otherwise, process with the complete network initialization.
# /etc/myname contains my symbolic name
hostname=`cat /etc/myname`
hostname $hostname
if [ -f /etc/myname ]; then
hostname=`cat /etc/myname`
hostname $hostname
else
hostname=`hostname`
fi
if [ -f /etc/defaultdomain ]; then
domainname `cat /etc/defaultdomain`
fi


Loading…
Cancel
Save