mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-19 19:15:22 +00:00
rc: trap CTRL-C for importer, exit gracefully for resuming boot
This commit is contained in:
parent
83b873d4eb
commit
e134f0e4f3
@ -100,7 +100,7 @@ fi
|
||||
/etc/rc.d/syscons onestart
|
||||
|
||||
# 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.
|
||||
/sbin/conscontrol mute off > /dev/null
|
||||
|
||||
@ -27,21 +27,6 @@
|
||||
INSTALL="/.probe.for.install.media"
|
||||
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()
|
||||
{
|
||||
# ensure config directory structure
|
||||
@ -64,6 +49,24 @@ bootstrap_and_exit()
|
||||
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()
|
||||
{
|
||||
OUTPUT=$(echo ${2} | sed 's/./& /g')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user