/etc/rc.rescue initializes driver rescue environment
This commit is contained in:
parent
fb7fb9e92c
commit
ca5b81bf6f
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
ETC=/etc/
|
ETC=/etc/
|
||||||
USRETC=/usr/etc/
|
USRETC=/usr/etc/
|
||||||
FILES1=fstab group hostname.file inet.conf motd mtab passwd profile protocols rc services termcap ttytab utmp rc.cd binary_sizes binary_sizes.big
|
FILES1=fstab group hostname.file inet.conf motd mtab passwd profile protocols rc services termcap ttytab utmp rc.cd binary_sizes binary_sizes.big rc.rescue
|
||||||
FILES2=shadow
|
FILES2=shadow
|
||||||
FILES3=daily dhcptags.conf rc
|
FILES3=daily dhcptags.conf rc
|
||||||
|
|
||||||
|
1
etc/rc
1
etc/rc
@ -179,6 +179,7 @@ esac
|
|||||||
# Further initialization.
|
# Further initialization.
|
||||||
test -f /usr/etc/rc && sh /usr/etc/rc $action
|
test -f /usr/etc/rc && sh /usr/etc/rc $action
|
||||||
test -f /usr/local/etc/rc && sh /usr/local/etc/rc $action
|
test -f /usr/local/etc/rc && sh /usr/local/etc/rc $action
|
||||||
|
test -f /etc/rc.rescue && sh /etc/rc.rescue $action
|
||||||
|
|
||||||
# Any messages?
|
# Any messages?
|
||||||
test "$action" = start -a -f /etc/issue && cat /etc/issue
|
test "$action" = start -a -f /etc/issue && cat /etc/issue
|
||||||
|
28
etc/rc.rescue
Normal file
28
etc/rc.rescue
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
DRIVERS=/sbin
|
||||||
|
RESCUE=/boot/rescue
|
||||||
|
|
||||||
|
if [ "$1" != start ]
|
||||||
|
then exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
service up $DRIVERS/rescue -dev /dev/rescue -arg 128
|
||||||
|
mkfs /dev/rescue || exit
|
||||||
|
mount /dev/rescue $RESCUE || exit
|
||||||
|
cp $DRIVERS/memory $RESCUE
|
||||||
|
label=`sysenv label`
|
||||||
|
case "$label" in
|
||||||
|
AT)
|
||||||
|
d=at_wini
|
||||||
|
;;
|
||||||
|
FLOPPY)
|
||||||
|
d=floppy
|
||||||
|
;;
|
||||||
|
BIOS)
|
||||||
|
d=bios_wini
|
||||||
|
;;
|
||||||
|
*) exit
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
cp $DRIVERS/$d $RESCUE
|
||||||
|
service rescue $RESCUE
|
Loading…
x
Reference in New Issue
Block a user