From 51802a966d90440f7a644ee318d9a47a31e768f7 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Tue, 7 Sep 1999 19:52:07 +0000 Subject: add an 'unconfigure' sort of thing. --- rc.d/rc.sysinit | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'rc.d') diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit index 9d226dfc..0755d5f2 100755 --- a/rc.d/rc.sysinit +++ b/rc.d/rc.sysinit @@ -384,6 +384,44 @@ fi # filesystems are NOT unmounted in single user mode. action "Mounting local filesystems" mount -a -t nonfs,smbfs,ncpfs,proc +# Configure machine if necessary. +if [ -f /.unconfigured ]; then + if [ -x /usr/sbin/rootconfig ]; then + /usr/sbin/rootconfig + else if [ -x /usr/bin/passwd ]; then + /usr/bin/passwd root + fi + if [ -x /usr/sbin/netconfig ]; then + /usr/sbin/netconfig + fi + if [ -x /usr/sbin/timeconfig ]; then + /usr/sbin/timeconfig + fi + if [ -x /usr/sbin/authconfig ]; then + /usr/sbin/authconfig --nostart + fi + if [ -x /usr/sbin/ntsysv ]; then + /usr/sbin/ntsysv --level 35 + fi + + # Reread in network configuration data. + if [ -f /etc/sysconfig/network ]; then + . /etc/sysconfig/network + + # Reset the hostname. + action "Resetting hostname ${HOSTNAME}" hostname ${HOSTNAME} + + # Reset the NIS domain name. + if [ -n "$NISDOMAIN" ]; then + action "Resetting NIS domain name $NISDOMAIN" domainname $NISDOMAIN + else + domainname "" + fi + fi + + rm -f /.unconfigured +fi + if [ -x /sbin/quotaon ]; then action "Turning on user and group quotas for local filesystems" /sbin/quotaon -a fi -- cgit v1.2.1