2006-02-15 12:18:21 +01:00
|
|
|
#!/bin/sh
|
|
|
|
set -e
|
2008-12-11 15:42:23 +01:00
|
|
|
|
|
|
|
exec >/dev/log
|
|
|
|
exec 2>/dev/log
|
|
|
|
exec </dev/null
|
|
|
|
|
2010-05-07 18:23:07 +02:00
|
|
|
/bin/service -c up /bin/pci -config /etc/system.conf
|
2010-04-09 23:56:44 +02:00
|
|
|
/bin/service -cn up /bin/floppy -config /etc/system.conf -dev /dev/fd0
|
2006-02-15 12:18:21 +01:00
|
|
|
if [ X`/bin/sysenv bios_wini` = Xyes ]
|
|
|
|
then
|
|
|
|
echo Using bios_wini.
|
2010-07-01 16:35:47 +02:00
|
|
|
/bin/service -c up /bin/bios_wini -dev /dev/c0d0
|
2006-02-15 12:18:21 +01:00
|
|
|
else
|
2010-07-01 16:35:47 +02:00
|
|
|
/bin/service -c up /bin/at_wini -dev /dev/c0d0 -config /etc/system.conf -label at_wini_0
|
2010-07-03 19:51:12 +02:00
|
|
|
/bin/service -cr up /bin/at_wini -dev /dev/c1d0 -config /etc/system.conf -label at_wini_1 -args instance=1
|
2006-02-15 12:18:21 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
rootdev=`sysenv rootdev` || echo 'No rootdev?'
|
|
|
|
rootdevname=`/bin/dev2name "$rootdev"` ||
|
|
|
|
{ echo 'No device name for root device'; exit 1; }
|
|
|
|
|
2009-08-18 13:36:01 +02:00
|
|
|
if [ "`sysenv bin_img`" = 1 ]
|
|
|
|
then
|
|
|
|
bin_img="-i "
|
|
|
|
fi
|
|
|
|
|
2006-02-15 12:18:21 +01:00
|
|
|
if sysenv cdproberoot >/dev/null
|
|
|
|
then
|
|
|
|
echo
|
|
|
|
echo 'Looking for boot CD. This may take a minute.'
|
|
|
|
echo 'Please ignore any error messages.'
|
|
|
|
echo
|
|
|
|
cddev=`cdprobe` || { echo 'No CD found'; exit 1; }
|
|
|
|
export cddev
|
|
|
|
echo "Loading ramdisk from ${cddev}p1"
|
|
|
|
loadramdisk "$cddev"p1
|
|
|
|
elif [ "$rootdevname" = "/dev/ram" ]
|
|
|
|
then
|
|
|
|
ramimagedev=`sysenv ramimagedev` ||
|
|
|
|
{ echo 'ramimagedev not found'; exit 1; }
|
|
|
|
ramimagename=`/bin/dev2name "$ramimagedev"` ||
|
|
|
|
{ echo 'No device name for ramimagedev'; exit 1; }
|
|
|
|
echo "Loading ramdisk from $ramimagename"
|
|
|
|
loadramdisk "$ramimagename"
|
|
|
|
fi
|
|
|
|
echo "Root device name is $rootdevname"
|
2009-08-18 13:36:01 +02:00
|
|
|
/bin/newroot $bin_img"$rootdevname"
|
2006-03-07 15:58:18 +01:00
|
|
|
exec /bin/sh /etc/rc "$@"
|