source: clfs-embedded/bootscripts/clfs/rc.d/shutdown@ 406ca8f

Last change on this file since 406ca8f was 1933be2, checked in by Maarten Lankhorst <mlankhorst@…>, 15 years ago

bootscripts: Updates, and add a network bridge startup file

  • Property mode set to 100755
File size: 579 bytes
RevLine 
[a44b91b]1#!/bin/ash
2
3# System Shutdown Script
4#
5
[381c53b]6. /etc/rc.d/init.d/functions
[a44b91b]7
8echo
9echo "System is going down for reboot or halt now."
10echo
11
12
[b9cef84]13echo "Starting stop scripts."
[a44b91b]14
15for i in /etc/rc.d/stop/*
16do
17 if [ -x $i ]; then
18 $i stop
19 fi
20done
21
[1933be2]22if [ -x /sbin/hwclock ] && [ -e /dev/rtc ]; then
[8172859]23 echo -n "Syncing hardware clock to system clock:"
24 hwclock --systohc --utc
25 check_status
26fi
27
28if [ -x /sbin/swapoff ]; then
29 echo -n "Disabling swap space: "
30 swapoff -a
31 check_status
32fi
[a44b91b]33
34echo -n "Syncing all filesystems: "
35sync
36check_status
37
38echo -n "Unmounting all filesystems: "
39umount -a -r
[1933be2]40
Note: See TracBrowser for help on using the repository browser.