source:
bootscripts-embedded/clfs/rc.d/shutdown@
292c832
| Last change on this file since 292c832 was 292c832, checked in by , 15 years ago | |
|---|---|
|
|
| File size: 579 bytes | |
| Rev | Line | |
|---|---|---|
| [97ad60e] | 1 | #!/bin/ash |
| 2 | ||
| 3 | # System Shutdown Script | |
| 4 | # | |
| 5 | ||
| 6 | . /etc/rc.d/init.d/functions | |
| 7 | ||
| 8 | echo | |
| 9 | echo "System is going down for reboot or halt now." | |
| 10 | echo | |
| 11 | ||
| [292c832] | 12 | |
| [97ad60e] | 13 | echo "Starting stop scripts." |
| 14 | ||
| [292c832] | 15 | for i in /etc/rc.d/stop/* |
| 16 | do | |
| 17 | if [ -x $i ]; then | |
| 18 | $i stop | |
| 19 | fi | |
| [97ad60e] | 20 | done |
| 21 | ||
| [292c832] | 22 | if [ -x /sbin/hwclock ] && [ -e /dev/rtc ]; then |
| 23 | echo -n "Syncing hardware clock to system clock:" | |
| 24 | hwclock --systohc --utc | |
| 25 | check_status | |
| 26 | fi | |
| [97ad60e] | 27 | |
| [292c832] | 28 | if [ -x /sbin/swapoff ]; then |
| 29 | echo -n "Disabling swap space: " | |
| 30 | swapoff -a | |
| 31 | check_status | |
| 32 | fi | |
| [97ad60e] | 33 | |
| 34 | echo -n "Syncing all filesystems: " | |
| 35 | sync | |
| 36 | check_status | |
| 37 | ||
| 38 | echo -n "Unmounting all filesystems: " | |
| 39 | umount -a -r | |
| [292c832] | 40 |
Note:
See TracBrowser
for help on using the repository browser.
