From c14e862fca1c53620fd28465c6292bdcaadf22ab Mon Sep 17 00:00:00 2001 From: Cem Keylan Date: Sat, 16 May 2020 04:26:42 +0300 Subject: init: change emergency-shell to shell, minor changes --- rc.boot | 17 ++++++++--------- rc.lib | 8 +++----- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/rc.boot b/rc.boot index 66ad355..b9e7e14 100755 --- a/rc.boot +++ b/rc.boot @@ -54,28 +54,27 @@ command -v udevd >/dev/null && { udevadm settle } -out "Remounting rootfs as ro..."; { - mount -o remount,ro / || emergency_shell -} - +out "Remounting rootfs as read-only..."; { + mount -o remount,ro / || shell } out "Checking filesystems..."; { fsck -ATat noopts=_netdev - [ $? -gt 1 ] && emergency_shell + [ $? -gt 1 ] && shell } -out "Mounting rootfs rw..."; { - mount -o remount,rw / || emergency_shell +out "Mounting rootfs read-write..."; { + mount -o remount,rw / || shell } out "Mounting all local filesystems..."; { mount -at nosysfs,nonfs,nonfs4,nosmbfs,nocifs -O no_netdev || - emergency_shell + shell +} } out "Enabling swap..."; { - swapon -a || emergency_shell + swapon -a || shell } out "Seeding random..."; { diff --git a/rc.lib b/rc.lib index 1843304..c95d55a 100644 --- a/rc.lib +++ b/rc.lib @@ -7,11 +7,9 @@ out() { printf '\033[1;36m-> \033[m\033[1m%s\033[m\n' "$@" ;} error() { printf '\033[1;31m!> ERROR: \033[m\033[1m%s\033[m\n' "$@" >&2 ;} -emergency_shell() { - error "Cannot continue init due to errors above, starting emergency shell" \ - "When ready, type 'exit' to continue the boot." - - /bin/sh -l +shell() { + error "Dropping to shell, type 'exit' to continue the boot process." + sh -l } } -- cgit v1.2.3