source: trunk/minix/drivers/memory/ramdisk/rc@ 9

Last change on this file since 9 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 1.0 KB
RevLine 
[9]1#!/bin/sh
2set -e
3/bin/service up /bin/pci
4/bin/service up /bin/floppy -dev /dev/fd0
5if [ X`/bin/sysenv bios_wini` = Xyes ]
6then
7 echo Using bios_wini.
8 /bin/service up /bin/bios_wini -dev /dev/c0d0
9else
10 /bin/service up /bin/at_wini -dev /dev/c0d0
11fi
12
13rootdev=`sysenv rootdev` || echo 'No rootdev?'
14rootdevname=`/bin/dev2name "$rootdev"` ||
15 { echo 'No device name for root device'; exit 1; }
16
17if sysenv cdproberoot >/dev/null
18then
19 echo
20 echo 'Looking for boot CD. This may take a minute.'
21 echo 'Please ignore any error messages.'
22 echo
23 cddev=`cdprobe` || { echo 'No CD found'; exit 1; }
24 export cddev
25 echo "Loading ramdisk from ${cddev}p1"
26 loadramdisk "$cddev"p1
27elif [ "$rootdevname" = "/dev/ram" ]
28then
29 ramimagedev=`sysenv ramimagedev` ||
30 { echo 'ramimagedev not found'; exit 1; }
31 ramimagename=`/bin/dev2name "$ramimagedev"` ||
32 { echo 'No device name for ramimagedev'; exit 1; }
33 echo "Loading ramdisk from $ramimagename"
34 loadramdisk "$ramimagename"
35fi
36echo "Root device name is $rootdevname"
37/bin/newroot "$rootdevname"
38exec /bin/sh /etc/rc "$@"
Note: See TracBrowser for help on using the repository browser.