#!/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
|