From owner-freebsd-bugs@FreeBSD.ORG Sat Jun 19 11:41:39 2004 Return-Path: Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9865716A4CE; Sat, 19 Jun 2004 11:41:39 +0000 (GMT) Received: from skutsje.san.webweaving.org (skutsje.san.webweaving.org [209.132.96.45]) by mx1.FreeBSD.org (Postfix) with ESMTP id 66BAE43D5A; Sat, 19 Jun 2004 11:41:39 +0000 (GMT) (envelope-from dirkx@webweaving.org) Received: from skutsje.san.webweaving.org (localhost [127.0.0.1]) i5JBWOF2057257 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 19 Jun 2004 04:32:25 -0700 (PDT) (envelope-from dirkx@webweaving.org) Received: from localhost (dirkx@localhost)i5JBWOqt057246; Sat, 19 Jun 2004 04:32:24 -0700 (PDT) (envelope-from dirkx@webweaving.org) X-Authentication-Warning: skutsje.san.webweaving.org: dirkx owned process doing -bs Date: Sat, 19 Jun 2004 04:32:24 -0700 (PDT) From: Dirk-Willem van Gulik X-X-Sender: dirkx@skutsje.san.webweaving.org To: FreeBSD-gnats-submit@FreeBSD.org, freebsd-bugs@FreeBSD.org In-Reply-To: <200406191140.i5JBe69X060245@freefall.freebsd.org> Message-ID: <20040619043113.U51367@skutsje.san.webweaving.org> References: <200406191140.i5JBe69X060245@freefall.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: conf/68108: Adding mac-address /conf selector to diskless boot X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Jun 2004 11:41:39 -0000 The fix does not work on a default install. Below fixes that. Dw. diff -c3 /tmp/initdiskless initdiskless *** /tmp/initdiskless Sat Jun 19 12:51:53 2004 --- initdiskless Sat Jun 19 13:30:52 2004 *************** *** 40,45 **** --- 40,46 ---- # # /conf/base universal base # /conf/default modified by a secondary universal base + # /conf/${macaddress} modified by the mac address of the physical machine. # /conf/${ipba} modified based on the assigned broadcast IP # /conf/${ip} modified based on the machine's assigned IP # *************** *** 132,137 **** --- 133,146 ---- bootp_ipbca="" iflist=`ifconfig -l` for i in ${iflist} ; do + set `ifconfig ${i} ether` + if [ "x$5" = "xether" ]; then + _IFS=${IFS} + IFS=: + set $6 + boot_mac=$1$2$3$4$5$6 + IFS=${_IFS} + fi set `ifconfig ${i}` while [ $# -ge 1 ] ; do if [ "${bootp_ifc}" = "" -a "$1" = "inet" ] ; then *************** *** 146,152 **** break fi done ! echo "Interface ${bootp_ifc} IP-Address ${bootp_ipa} Broadcast ${bootp_ipbca}" # Figure out our NFS root path # --- 155,161 ---- break fi done ! echo "Interface ${boot_mac} ${bootp_ifc} IP-Address ${bootp_ipa} Broadcast ${bootp_ipbca}" # Figure out our NFS root path # *************** *** 159,167 **** shift done ! # Resolve templates in /conf/base, /conf/default, /conf/${bootp_ipbca}, ! # and /conf/${bootp_ipa}. For each subdirectory found within these ! # directories: # # - calculate memory filesystem sizes. If the subdirectory (prior to # NFS remounting) contains the file 'md_size', the contents specified --- 168,176 ---- shift done ! # Resolve templates in /conf/base, /conf/default, /conf/${boot_mac}, ! # /conf/${bootp_ipbca} # and /conf/${bootp_ipa}. For each subdirectory ! # found within these directories: # # - calculate memory filesystem sizes. If the subdirectory (prior to # NFS remounting) contains the file 'md_size', the contents specified *************** *** 179,185 **** # it before attemping to the remount. This allows the root to be # relocated without needing to change the remount files. # ! for i in base default ${bootp_ipbca} ${bootp_ipa} ; do for j in /conf/$i/* ; do # memory filesystem size specification # --- 188,194 ---- # it before attemping to the remount. This allows the root to be # relocated without needing to change the remount files. # ! for i in base default ${boot_mac} ${bootp_ipbca} ${bootp_ipa} ; do for j in /conf/$i/* ; do # memory filesystem size specification #