Commit e134f0e4 authored by Franco Fichtner's avatar Franco Fichtner

rc: trap CTRL-C for importer, exit gracefully for resuming boot

parent 83b873d4
...@@ -100,7 +100,7 @@ fi ...@@ -100,7 +100,7 @@ fi
/etc/rc.d/syscons onestart /etc/rc.d/syscons onestart
# run the config importer during early startup # run the config importer during early startup
/usr/local/etc/rc.importer -b || exit 1 /usr/local/etc/rc.importer -b
# Enable console output if its muted. # Enable console output if its muted.
/sbin/conscontrol mute off > /dev/null /sbin/conscontrol mute off > /dev/null
......
...@@ -27,21 +27,6 @@ ...@@ -27,21 +27,6 @@
INSTALL="/.probe.for.install.media" INSTALL="/.probe.for.install.media"
MNT="/tmp/hdrescue" MNT="/tmp/hdrescue"
DO_BOOT=
while getopts b OPT; do
case ${OPT} in
b)
DO_BOOT="-b"
shift
;;
*)
echo "Unknown argument during import." >&2
exit 0
;;
esac
done
bootstrap_and_exit() bootstrap_and_exit()
{ {
# ensure config directory structure # ensure config directory structure
...@@ -64,6 +49,24 @@ bootstrap_and_exit() ...@@ -64,6 +49,24 @@ bootstrap_and_exit()
exit 0 exit 0
} }
trap bootstrap_and_exit 2
DO_BOOT=
while getopts b OPT; do
case ${OPT} in
b)
DO_BOOT="-b"
shift
;;
*)
echo "Unknown argument during import." >&2
bootstrap_and_exit
;;
esac
done
timeout_prompt() timeout_prompt()
{ {
OUTPUT=$(echo ${2} | sed 's/./& /g') OUTPUT=$(echo ${2} | sed 's/./& /g')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment