Plan 9 from Bell Labs’s /usr/web/sources/contrib/steve/rc/sysinfo

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


#!/bin/rc
# copy info that will be useful when
# rebuilding this box after a disk crash.

rfork ne

mkdir -p /cfg/systems/$sysname >[2] /dev/null

cd '#S'
for (i in sd*/fscfg)
	if (test -e $i){
		d=`{echo $i | sed 's@/@_@g'}
		cat $i > /cfg/systems/$sysname/$d
	}

for (i in sd*/fossil)
	if (test -e $i){
		d=`{echo $i | sed 's@/@_@g'}
		fossil/conf $i > /cfg/systems/$sysname/$d
	}

for (i in sd*/arenas0)
	if (test -e $i){
		d=`{echo $i | sed 's@/@_@g'}
		venti/conf $i > /cfg/systems/$sysname/$d
	}

for (i in sd*/ctl)
	if (test -e $i){
		d=`{echo $i | sed 's@/@_@g'}
		cat $i > /cfg/systems/$sysname/$d
	}

if(! test -e /srv/dos)
	dossrv >/dev/null </dev/null >[2]/dev/null

for (i in sd*/9fat){
	if (test -e $i){
		unmount /n/9fat >/dev/null >[2]/dev/null
		mount -c /srv/dos /n/9fat $i

		d=`{echo $i | sed 's@/@_@g'}
		cat /n/9fat/plan9.ini > /cfg/systems/$sysname/$d^_plan9.ini
	}
}

unmount /n/9fat >/dev/null >[2]/dev/null
rm -f /srv/dos

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.