aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/noctrlaltdel
blob: 82d31a1b04b04b44cb70a39b280696a506d904cb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh

basename=`basename $0`
param=$*

set a `pidof -x -o $$ -o %PPID $basename `
shift

if [ $# -ge 1 ] ; then 
  kill $*
  exec /sbin/shutdown $param
  exit 0
fi
echo "Reboot requested, ... hit a second time to confirm!" | tee /dev/console | wall

( sleep 2 ; \
echo "Time elapsed (2 seconds), reboot canceled!"| tee /dev/console | wall ) &

exit 0