#!/bin/sh
+PATH=/usr/bin:/usr/sbin:/bin:/sbin
mount -t proc proc /proc
-echo "************************************************************" >&2
cat /proc/cmdline >&2
-echo "************************************************************" >&2
if grep -qw rescue /proc/cmdline ; then
cat <<EOF >&2
____ _____ ____ ____ _ _ _____ ____ ___ ___ _____
| |_) | _| \___ \| | | | | | _| | _ \| | | | | | || |
| _ <| |___ ___) | |___| |_| | |___ | |_) | |_| | |_| || |
|_| \_\_____|____/ \____|\___/|_____| |____/ \___/ \___/ |_|
-***************************************************************
+
EOF
+ sleep 2
else
umount /proc
- exec /init.FS
+ mv /init.FS /init ; exec /init
fi
mount -t sysfs sysfs /sys
mount -t devtmpfs devtmpfs /dev
mkdir /dev/pts
mount -t devpts devpts /dev/pts
-udevd -d -c 500 --resolve-names=never
+udevd -d -c 1 --resolve-names=never
+echo "re-trigger kernel uevents and wait for udev to settle" >&2
udevadm trigger -c add
-udevadm settle
-cat message.txt >&2
+udevadm settle -t 30
+
+cat <<EOF >&2
+ ____********************************
+ / ___|_ __ ___ ___| |_(_)_ __ __ _ ___
+ | | _| '__/ _ \/ _ \ __| | '_ \ / _' / __|
+ | |_| | | | __/ __/ |_| | | | | (_| \__ \
+ \____|_| \___|\___|\__|_|_| |_|\__, |___/
+ |___/
+ _____ _ _ _ _ _
+ | ____|__ _ _ __| |_| |__ | (_)_ __ __ _| |
+ | _| / _' | '__| __| '_ \| | | '_ \ / _' | |
+ | |__| (_| | | | |_| | | | | | | | | (_| |_|
+ |_____\__,_|_| \__|_| |_|_|_|_| |_|\__, (_)
+ |___/
+ *******************************
+ You are now on your own...
+
+EOF
+
exec setsid cttyhack sh