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
|
|
|
|
|
2011-12-22 01:29:27 +01:00
|
|
|
FSCK=/bin/fsck.mfs
|
2012-05-07 13:38:39 +02:00
|
|
|
ACPI=/usr/sbin/acpi
|
2011-10-24 01:53:30 +02:00
|
|
|
if [ -e $ACPI -a -n "`sysenv acpi`" ]
|
2010-09-02 17:44:36 +02:00
|
|
|
then
|
2011-10-24 01:53:30 +02:00
|
|
|
/bin/service -c up $ACPI
|
2010-09-02 17:44:36 +02:00
|
|
|
fi
|
2012-05-07 13:38:39 +02:00
|
|
|
/bin/service -c up /usr/sbin/pci
|
2010-07-05 21:37:08 +02:00
|
|
|
/bin/service -cn up /sbin/floppy -dev /dev/fd0
|
2012-04-11 17:22:26 +02:00
|
|
|
if [ X`/bin/sysenv ahci` = Xyes ]
|
2010-08-11 13:16:44 +02:00
|
|
|
then
|
|
|
|
# this is here temporarily, for testing purposes
|
|
|
|
/bin/service -c up /sbin/ahci -dev /dev/c0d0 -label ahci_0 -args instance=0
|
2006-02-15 12:18:21 +01:00
|
|
|
else
|
2010-07-05 21:37:08 +02:00
|
|
|
/bin/service -c up /sbin/at_wini -dev /dev/c0d0 -label at_wini_0
|
|
|
|
/bin/service -cr up /sbin/at_wini -dev /dev/c1d0 -label at_wini_1 -args instance=1
|
2006-02-15 12:18:21 +01:00
|
|
|
fi
|
2011-02-23 14:05:28 +01:00
|
|
|
/bin/service up /sbin/procfs || echo "WARNING: couldn't start procfs"
|
2006-02-15 12:18:21 +01:00
|
|
|
|
2012-01-31 12:48:14 +01:00
|
|
|
if /bin/sysenv rootdevname >/dev/null
|
2012-11-01 19:40:56 +01:00
|
|
|
then rootdevname=/dev/`/bin/sysenv rootdevname`
|
|
|
|
else echo "rootdevname not set"
|
|
|
|
exit 1
|
2012-01-31 12:48:14 +01:00
|
|
|
fi
|
2006-02-15 12:18:21 +01:00
|
|
|
|
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
|
2012-11-01 19:40:56 +01:00
|
|
|
ramimagename=/dev/`/bin/sysenv ramimagename`
|
2006-02-15 12:18:21 +01:00
|
|
|
echo "Loading ramdisk from $ramimagename"
|
2012-01-31 12:48:14 +01:00
|
|
|
loadramdisk "$ramimagename" || echo "WARNING: loadramdisk failed"
|
2006-02-15 12:18:21 +01:00
|
|
|
fi
|
2012-11-01 19:40:56 +01:00
|
|
|
|
2006-02-15 12:18:21 +01:00
|
|
|
echo "Root device name is $rootdevname"
|
2011-12-22 01:29:27 +01:00
|
|
|
if [ -e $FSCK ]
|
|
|
|
then $FSCK -p $rootdevname
|
|
|
|
fi
|
2012-04-10 04:07:51 +02:00
|
|
|
|
|
|
|
# Change root from temporary boot ramdisk to the configure
|
|
|
|
# root device
|
|
|
|
/bin/mount -n $bin_img"$rootdevname" /
|
|
|
|
|
2012-02-14 16:44:21 +01:00
|
|
|
/bin/mount -e -n -t procfs none /proc || echo "WARNING: couldn't mount procfs"
|
2011-12-22 01:29:27 +01:00
|
|
|
|
2006-03-07 15:58:18 +01:00
|
|
|
exec /bin/sh /etc/rc "$@"
|