Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Mar 1995 21:20:01 -0800
From:      smp@clem.systemsix.com
To:        freebsd-bugs
Subject:   misc/249: bug in netstart
Message-ID:  <199503180520.VAA12697@freefall.cdrom.com>
In-Reply-To: Your message of Fri, 17 Mar 1995 22:20:17 -0700 <199503180520.WAA04342@rick.systemsix.com>

next in thread | previous in thread | raw e-mail | index | archive | help

>Number:         249
>Category:       misc
>Synopsis:       $hostname variable in /etc/netstart not always set
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs (FreeBSD bugs mailing list)
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Mar 17 21:20:00 1995
>Originator:     Steve Passe
>Organization:
New Ideas
>Release:        FreeBSD 2.1.0-Development i386
>Environment:

	950210-SNAP, DISKLESS kernel

>Description:

	/etc/netstart fails to set its variable $hostname when `hostname -s`
	returns a valid value.  The test "if [ -z "`hostname -s`" ] ; then"
	fails and the script variable $hostname is not set, ie. it is NULL.
	This causes failure of any following commands (eg. route add) that
	expect it to be set.


>How-To-Repeat:

	When a DISKLESS kernel boots via tftpd/bootpd the command
	`hostname -s` will return a valid hostname.

>Fix:

diff -r1.1 netstart

  if [ -z "`hostname -s`" ] ; then
	hostname=`cat /etc/myname`
	hostname $hostname
+ else
+ 	hostname=`hostname -s`
  fi
>Audit-Trail:
>Unformatted:





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199503180520.VAA12697>