Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | ### BEGIN INIT INFO |
| 3 | # Provides: single |
| 4 | # Required-Start: $local_fs $all killprocs |
| 5 | # Required-Stop: |
| 6 | # Default-Start: 1 |
| 7 | # Default-Stop: |
| 8 | # Short-Description: executed by init(8) upon entering runlevel 1 (single). |
| 9 | ### END INIT INFO |
| 10 | |
| 11 | PATH="/sbin:/bin:/usr/sbin:/usr/bin" |
| 12 | |
| 13 | # Kill all processes. |
| 14 | echo "Sending all processes the TERM signal..." |
| 15 | killall5 -15 |
| 16 | sleep 5 |
| 17 | echo "Sending all processes the KILL signal..." |
| 18 | killall5 -9 |
| 19 | |
| 20 | # We start update here, since we just killed it. |
| 21 | test -x /sbin/update && update |
| 22 | |
| 23 | echo "Entering single-user mode..." |
| 24 | exec init -t1 S |