1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-29 12:03:03 +00:00

Restore pre-rcNG behaviour:

SIGINT (Ctrl-c) kills the current script
SIGQUIT (Ctrl-\) kills /etc/rc (dropping you into single-user)

Prodded by:	harti
This commit is contained in:
Mike Makonnen 2004-06-06 18:06:09 +00:00
parent e7291a6b12
commit 30e2462c71
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=130161
2 changed files with 4 additions and 5 deletions

4
etc/rc
View File

@ -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

View File

@ -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