summaryrefslogtreecommitdiffstats
path: root/rescue/tree/etc/rc.sysinit
diff options
context:
space:
mode:
Diffstat (limited to 'rescue/tree/etc/rc.sysinit')
-rwxr-xr-xrescue/tree/etc/rc.sysinit63
1 files changed, 63 insertions, 0 deletions
diff --git a/rescue/tree/etc/rc.sysinit b/rescue/tree/etc/rc.sysinit
new file mode 100755
index 000000000..e6da12ea0
--- /dev/null
+++ b/rescue/tree/etc/rc.sysinit
@@ -0,0 +1,63 @@
+#!/bin/sh
+
+action() { echo $1; shift; $*; }
+
+export PATH=/bin:/sbin:/usr/bin:/usr/sbin
+
+echo -e "\t\t\tWelcome to \\033[1;36mMandriva\\033[0;39m Linux"
+
+action "Remounting root filesystem in read-write mode" mount -n -o remount,rw /
+
+ln -s /tmp/stage2/etc/* /etc 2>/dev/null
+
+rm -f /dev ; cp -a /tmp/stage2/dev /dev
+
+mkdir -p /mnt /var/log
+
+>/etc/mtab
+mount -f /
+mount -f /proc
+
+# Set the hostname.
+action "Setting hostname rescue" hostname rescue
+echo rescue > /etc/HOSTNAME
+
+# Loads common modules ( no kerneld :( )
+echo "Loading additional modules..."
+load() { modprobe $* 2>/dev/null; }
+load ide-mod
+load ide-probe
+load ide-disk
+load ide-cd
+load floppy
+load af_packet
+load isofs
+load vfat
+load ext3
+load reiserfs
+load xfs
+load jfs
+load loop
+load sd_mod
+load sr_mod
+
+/sbin/ifconfig lo 127.0.0.1 netmask 255.0.0.0
+/sbin/route add 127.0.0.1 lo
+
+# disable the weird echoprt in cooked mode for user interaction:
+stty sane
+
+#LANGUAGE (filled by make_rescue_img)
+
+grep -q noauto /proc/cmdline || drvinst SERIAL_USB
+
+if grep ka /proc/cmdline; then
+ echo Welcome to Ka rescue
+ drvinst
+ cd /ka
+ ./install.sh
+fi
+
+if ! grep -q expert /proc/cmdline; then
+ rescue-gui
+fi