Cover V04, I05
Article
Listing 1
Listing 2
Listing 3

sep95.tar


Listing 2: Key routines from /etc/rcO

24      a=`stty -g`     #save stty values for later restoration
25
26      echo 'The system is coming down.  Please wait.'
27
42      if [ -d /etc/rc0.d ]
43      then
44              for f in /etc/rc0.d/K*
45              {
46                      if [ -s ${f} ]
47                      then
48                              /bin/sh ${f} stop
49                      fi
50              }
54              for f in /etc/rc0.d/S*
55              {
56                      if [ -s ${f} ]
57                      then
58                              /bin/sh ${f} start
59                      fi
60              }
61      fi
74      trap "" 15
75      kill -15 -1
76      sleep 10
77      /etc/killall  9 2>/dev/null
78      sleep 10
79      sync;sync;sync
80      /etc/umountall
81      stty $a 2>/dev/null    #restore saved stty values
82      sync;  sync
83      echo '
84      The system is down.'
85      sync