]>
Commit | Line | Data |
---|---|---|
3f6614be | 1 | description "Shutdown or reboot the system" |
da9503bf SS |
2 | author "IPFire Team" |
3 | ||
1237e479 | 4 | start on shutdown or reboot |
3f6614be | 5 | |
da9503bf SS |
6 | console output |
7 | ||
3f6614be | 8 | script |
c64cad5f SS |
9 | # Exterminate any lil' process that managed to evade my merciless |
10 | # terminating. | |
c64cad5f | 11 | killall5 -15 || true |
c64cad5f SS |
12 | sleep 5 |
13 | killall5 -9 || true | |
ae950662 | 14 | |
c64cad5f | 15 | mount -n -o remount,ro / || true |
da9503bf | 16 | |
c64cad5f SS |
17 | # The UPSTART_EVENTS variable contains the event that has been called. |
18 | # The script use it to perform the requested action. | |
92017d26 | 19 | if [ "${UPSTART_EVENTS}" = "reboot" ]; then |
cf572b2d | 20 | reboot -pf |
92017d26 | 21 | else |
cf572b2d | 22 | halt -pf |
3f6614be | 23 | fi |
da9503bf | 24 | end script |