. service tells you which device it couldn't stat
[minix3.git] / drivers / memory / ramdisk / rc
blobe4e78163460fb7839b22ba0fccf8a01ac60013ad
1 #!/bin/sh
2 set -e
3 /bin/service up /bin/pci -config /etc/drivers.conf
4 /bin/service -c up /bin/floppy -config /etc/drivers.conf -dev /dev/fd0
5 if [ X`/bin/sysenv bios_wini` = Xyes ]
6 then
7 echo Using bios_wini.
8 /bin/service -c up /bin/bios_wini -dev /dev/c0d0
9 else
10 /bin/service -c up /bin/at_wini -dev /dev/c0d0 -config /etc/drivers.conf -label at_wini_0
11 /bin/service -c up /bin/at_wini -dev /dev/c1d0 -config /etc/drivers.conf -label at_wini_1 -args ata_instance=1
12 #/bin/service -c up /bin/at_wini -dev /dev/c0d0 -script /etc/rs.single -config /etc/drivers.conf
15 rootdev=`sysenv rootdev` || echo 'No rootdev?'
16 rootdevname=`/bin/dev2name "$rootdev"` ||
17 { echo 'No device name for root device'; exit 1; }
19 if sysenv cdproberoot >/dev/null
20 then
21 echo
22 echo 'Looking for boot CD. This may take a minute.'
23 echo 'Please ignore any error messages.'
24 echo
25 cddev=`cdprobe` || { echo 'No CD found'; exit 1; }
26 export cddev
27 echo "Loading ramdisk from ${cddev}p1"
28 loadramdisk "$cddev"p1
29 elif [ "$rootdevname" = "/dev/ram" ]
30 then
31 ramimagedev=`sysenv ramimagedev` ||
32 { echo 'ramimagedev not found'; exit 1; }
33 ramimagename=`/bin/dev2name "$ramimagedev"` ||
34 { echo 'No device name for ramimagedev'; exit 1; }
35 echo "Loading ramdisk from $ramimagename"
36 loadramdisk "$ramimagename"
38 echo "Root device name is $rootdevname"
39 /bin/newroot "$rootdevname"
40 exec /bin/sh /etc/rc "$@"