Plan 9 from Bell Labs’s /usr/web/sources/contrib/someone/root/rc/bin/loadcfgpxe

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#!/bin/rc
# loadcfgpxe - turn /cfg/pxe/$myether into rc variable assignments, execute them
myeth=`{ndb/query sys $sysname ether}
if (! ~ $#myeth 0) {
	pxefile=/cfg/pxe/$myeth(1)
	if (test -e $pxefile) {
		# in case we booted directly, without 9boot
		# need to reject "[menuchoice]" tags
		eval `{sed -e '/^($|[\[#])/d' -e '/^menu/d' \
			-e 's/^([^=]+)=/''\1''=/' \
			-e '/=([^'']|$)/s/=(.*)/=''\1''/' $pxefile}
		'*envloaded'=1
	}
}

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.