+# launch repair shell
+# which after exiting will reboot
+repair_shell() {
+ local reason="$2"
+
+ # don't use '\n' in nls macro !
+ echo
+ echo
+ echo "$reason"
+ nls "*** Dropping you to a shell; the system will reboot"
+ nls "*** when you leave the shell."
+ echo
+
+ [ "$SELINUX" = "1" ] && disable_selinux
+ if ! is_no "$RUN_SULOGIN_ON_ERR"; then
+ /sbin/sulogin
+ else
+ /bin/sh
+ fi
+
+ run_cmd "Unmounting file systems" umount -a
+ run_cmd "Remounting root filesystem in ro mode" mount -n -o remount,ro /
+ run_cmd "Automatic reboot in progress" reboot
+}
+