]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blob - pkgs/core/initscripts/init/shutdown.conf
Remove legacy build system.
[people/ms/ipfire-3.x.git] / pkgs / core / initscripts / init / shutdown.conf
1 description "Shutdown or reboot the system"
2 author "IPFire Team"
3
4 start on shutdown or reboot
5
6 console output
7
8 script
9 # Emit event to kill all network services
10 initctl emit kill-all-network-services
11
12 # Shutdown the network
13 initctl emit shutdown-network
14
15 # Emit event to kill all system services
16 initctl emit kill-all-services
17
18 # Exterminate any lil' process that managed to evade my merciless
19 # terminating.
20 killall5 -15 || true
21 sleep 5
22 killall5 -9 || truees
23
24 mount -n -o remount,ro / || true
25
26 # The UPSTART_EVENTS variable contains the event that has been called.
27 # The script use it to perform the requested action.
28 if [ "${UPSTART_EVENTS}" = "reboot" ]; then
29 reboot -pf
30 else
31 halt -pf
32 fi
33 end script