From: Ralph Ronnquist Date: Thu, 8 Feb 2024 11:31:18 +0000 (+1100) Subject: Revised init X-Git-Url: https://git.rrq.au/?a=commitdiff_plain;h=6a33713cb9633b2b16a2ccc1eedc4dbea6fb2913;p=rrq%2Frescue-boot.git Revised init --- diff --git a/init-udevd.template b/init-udevd.template index 43f2c2c..6bfc6dc 100755 --- a/init-udevd.template +++ b/init-udevd.template @@ -1,8 +1,7 @@ #!/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 <&2 ____ _____ ____ ____ _ _ _____ ____ ___ ___ _____ @@ -10,19 +9,39 @@ if grep -qw rescue /proc/cmdline ; then | |_) | _| \___ \| | | | | | _| | _ \| | | | | | || | | _ <| |___ ___) | |___| |_| | |___ | |_) | |_| | |_| || | |_| \_\_____|____/ \____|\___/|_____| |____/ \___/ \___/ |_| -*************************************************************** + 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 <&2 + ____******************************** + / ___|_ __ ___ ___| |_(_)_ __ __ _ ___ + | | _| '__/ _ \/ _ \ __| | '_ \ / _' / __| + | |_| | | | __/ __/ |_| | | | | (_| \__ \ + \____|_| \___|\___|\__|_|_| |_|\__, |___/ + |___/ + _____ _ _ _ _ _ + | ____|__ _ _ __| |_| |__ | (_)_ __ __ _| | + | _| / _' | '__| __| '_ \| | | '_ \ / _' | | + | |__| (_| | | | |_| | | | | | | | | (_| |_| + |_____\__,_|_| \__|_| |_|_|_|_| |_|\__, (_) + |___/ + ******************************* + You are now on your own... + +EOF + exec setsid cttyhack sh