3 # /etc/rc.shutdown: system shutdown script
9 # Set linefeed mode to avoid staircase effect
12 echo "The system is coming down. Please wait."
14 if [ "$PREVLEVEL" = "2" ]; then
16 if [ "${SERVICES[*]}" ]; then
17 for service
in "${SERVICES[@]}"; do
18 R_SERVICES
=($service ${R_SERVICES[@]})
20 for service
in "${R_SERVICES[@]}"; do
21 /etc
/rc.d
/$service stop
&> /tmp
/rc.$$
22 /usr
/bin
/logger
-t $service -f /tmp
/rc.$$
28 # Terminate all processes
34 /bin
/dd if=/dev
/urandom of
=/var
/lib
/urandom
/seed count
=1 2> /dev
/null
37 /sbin
/hwclock --systohc
39 # Write to wtmp file before unmounting
45 # Unmount file systems
46 /bin
/umount
-a -d -r -t nosysfs
,noproc
,nodevtmpfs
47 if [ -x /sbin
/lvm
]; then
48 /sbin
/vgchange
--ignorelockingfailure -a n
52 # Remount root filesystem read-only
53 /bin
/mount
-o remount
,ro
/
56 if [ "$RUNLEVEL" = "0" ]; then
57 /sbin
/poweroff
-d -f -i