[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
how /etc/rc knows whether it runs in single mode?
- To: misc_(_at_)_openbsd_(_dot_)_org
- Subject: how /etc/rc knows whether it runs in single mode?
- From: "Denis A. Doroshenko" <d_(_dot_)_doroshenko_(_at_)_omnitel_(_dot_)_net>
- Date: Sat, 6 Oct 2001 15:18:41 +0200
- Mail-followup-to: misc_(_at_)_openbsd_(_dot_)_org
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