From owner-freebsd-bugs Fri Mar 17 21:20:01 1995 Return-Path: bugs-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id VAA12704 for bugs-outgoing; Fri, 17 Mar 1995 21:20:01 -0800 Received: (from gnats@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id VAA12697; Fri, 17 Mar 1995 21:20:01 -0800 Date: Fri, 17 Mar 1995 21:20:01 -0800 Message-Id: <199503180520.VAA12697@freefall.cdrom.com> From: smp@clem.systemsix.com Reply-To: smp@clem.systemsix.com To: freebsd-bugs Subject: misc/249: bug in netstart In-Reply-To: Your message of Fri, 17 Mar 1995 22:20:17 -0700 <199503180520.WAA04342@rick.systemsix.com> Sender: bugs-owner@FreeBSD.org Precedence: bulk >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: