[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

how /etc/rc knows whether it runs in single mode?



hello, is it exit code or existence of /etc/rc.shutdown? may i don't see
something obvious?

| if [ $1x = shutdownx ]; then
|         dd if=/dev/urandom of=/var/db/host.random bs=1024 count=64 >/dev/null 2>
| &1
|         chmod 600 /var/db/host.random >/dev/null 2>&1

here ----------\

|         if [ $? -eq 0 -a -f /etc/rc.shutdown ]; then
|                 echo /etc/rc.shutdown in progress...
|                 . /etc/rc.shutdown
|                 echo /etc/rc.shutdown complete.
|                 if [ "X${powerdown}" = X"YES" ]; then
|                         exit 2
|                 fi
|         else
|                 echo single user: not running /etc/rc.shutdown
|         fi
|         exit 0
| fi

-- 
Let the Force be with You!..
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Denis A. Doroshenko                    internet services, unices, m$ os
System programmer and administrator    programming, administering, consulting
mailto:cyxob_(_at_)_thief_(_dot_)_dyndns_(_dot_)_org          do you BSD? --> http://www.OpenBSD.org



Visit your host, monkey.org