From ca5b81bf6f367483edc05df30b715d99640392f9 Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Fri, 21 Oct 2005 10:47:13 +0000 Subject: [PATCH] /etc/rc.rescue initializes driver rescue environment --- etc/Makefile | 2 +- etc/rc | 1 + etc/rc.rescue | 28 ++++++++++++++++++++++++++++ 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 etc/rc.rescue diff --git a/etc/Makefile b/etc/Makefile index 3630b403b..4645585f4 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -1,7 +1,7 @@ ETC=/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 FILES3=daily dhcptags.conf rc diff --git a/etc/rc b/etc/rc index bc4d8f005..61e542df7 100755 --- a/etc/rc +++ b/etc/rc @@ -179,6 +179,7 @@ esac # Further initialization. test -f /usr/etc/rc && sh /usr/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? test "$action" = start -a -f /etc/issue && cat /etc/issue diff --git a/etc/rc.rescue b/etc/rc.rescue new file mode 100644 index 000000000..f17aded0d --- /dev/null +++ b/etc/rc.rescue @@ -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 -- 2.44.0