#!/bin/rc
-mntgen -s slash /mnt
+# mount points
+mntgen -s slashn /n && chmod 666 /srv/slashn
+mntgen -s slashmnt /mnt && chmod 666 /srv/slashmnt
+mntgen -s mntexport /mnt/exportfs && chmod 666 /srv/mntexport
+
bind /root /mnt/broot
unmount /root
}
if not bootargs=$nobootprompt
nobootprompt=()
- mn=`{echo $bootargs | awk -F! '{print $1}'}
- ma=`{echo $bootargs | sed 's/[^!]*!?//'}
+ mn=`{echo $bootargs | sed 's,!, ,'}
+ ma=$mn(2-)
+ mn=$mn(1)
switch(m$"mn){
case $mt
mp=m$mn
if(test -x /bin/nusbrc && ! test -e /env/nousbrc)
nusbrc
-# wait for devices to settle down
-if(~ $#usbwait 1)
- sleep $usbwait
-if(~ $#usbwait 0)
- sleep 2
-
-. /rc/lib/net.rc
-. /rc/lib/local.rc
+# load boot methods
+fn showlocaldevs {}
+fn configlocal {}
+for(i in /rc/lib/*.rc){
+ . $i
+}
# add partitions and binds
configlocal
# cleanup so it can be restarted
nobootprompt=()
- rm -f /srv/^(cfs boot slashn cs dns)
+ rm -f /srv/^(cfs boot cs dns)
} </dev/cons