From smp@rick.systemsix.com Fri Mar 17 21:19:18 1995 Received: from rick.systemsix.com (rick.systemsix.com [198.99.86.136]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id VAA12669 for ; Fri, 17 Mar 1995 21:19:05 -0800 Received: (from smp@localhost) by rick.systemsix.com (8.6.9/8.6.9) id WAA04342; Fri, 17 Mar 1995 22:20:17 -0700 Message-Id: <199503180520.WAA04342@rick.systemsix.com> Date: Fri, 17 Mar 1995 22:20:17 -0700 From: smp@clem.systemsix.com Reply-To: smp@clem.systemsix.com To: FreeBSD-gnats-submit@freebsd.org Subject: bug in netstart X-Send-Pr-Version: 3.2 >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: closed >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Mar 17 21:20:00 1995 >Closed-Date: Mon Apr 10 18:41:51 PDT 1995 >Last-Modified: >Originator: Steve Passe >Release: FreeBSD 2.1.0-Development i386 >Organization: New Ideas >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 >Release-Note: >Audit-Trail: State-Changed-From-To: open->closed State-Changed-By: rgrimes State-Changed-When: Mon Apr 10 18:41:51 PDT 1995 State-Changed-Why: iThe variable hostname is now always set in sysconfig, maeing the sited conditions imposible. [Arg, this sucks, I can't edit :-(] >Unformatted: