summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authormtm <mtm@FreeBSD.org>2004-06-06 18:06:09 +0000
committermtm <mtm@FreeBSD.org>2004-06-06 18:06:09 +0000
commiteead69e718d0d157cfa225811cc0c07966cce730 (patch)
treeac5649a3504e4ed62c3b2c98d656ee60b1da9c8c /etc
parent1b8e607cd5c23d1560c6b3a787fa00aef38ff45c (diff)
downloadFreeBSD-src-eead69e718d0d157cfa225811cc0c07966cce730.zip
FreeBSD-src-eead69e718d0d157cfa225811cc0c07966cce730.tar.gz
Restore pre-rcNG behaviour:
SIGINT (Ctrl-c) kills the current script SIGQUIT (Ctrl-\) kills /etc/rc (dropping you into single-user) Prodded by: harti
Diffstat (limited to 'etc')
-rw-r--r--etc/rc4
-rw-r--r--etc/rc.subr5
2 files changed, 4 insertions, 5 deletions
diff --git a/etc/rc b/etc/rc
index 748f669..508d0b0 100644
--- a/etc/rc
+++ b/etc/rc
@@ -41,10 +41,10 @@
stty status '^T'
# Set shell to ignore SIGINT (2), but not children;
-# shell catches SIGQUIT (3) and returns to single user after fsck.
+# shell catches SIGQUIT (3) and returns to single user.
#
trap : 2
-trap : 3 # shouldn't be needed
+trap "echo 'Boot interrupted'; exit 1" 3
HOME=/
PATH=/sbin:/bin:/usr/sbin:/usr/bin
diff --git a/etc/rc.subr b/etc/rc.subr
index 74784b9..be5cbea 100644
--- a/etc/rc.subr
+++ b/etc/rc.subr
@@ -814,8 +814,6 @@ run_rc_script()
err 3 'USAGE: run_rc_script file arg'
fi
- trap "echo 'Reboot interrupted'; exit 1" 3
-
unset name command command_args command_interpreter \
extra_commands pidfile procname \
rcvar required_dirs required_files required_vars
@@ -833,7 +831,8 @@ run_rc_script()
if [ -n "$rc_fast_and_loose" ]; then
set $_arg ; . $_file
else
- ( trap "echo 'Reboot interrupted'; exit 1" 3
+ ( trap "echo Script $_file interrupted; kill -QUIT $$" 3
+ trap "echo Script $_file interrupted; exit 1" 2
set $_arg ; . $_file )
fi
fi
OpenPOWER on IntegriCloud