aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>1999-09-07 19:52:07 +0000
committerBill Nottingham <notting@redhat.com>1999-09-07 19:52:07 +0000
commit51802a966d90440f7a644ee318d9a47a31e768f7 (patch)
tree2d4160cfc278c1d44be7cd8cd4ab1c6bee3fe887
parent591bca858f116835c694f11dcfd9cc121b79fa3e (diff)
downloadinitscripts-51802a966d90440f7a644ee318d9a47a31e768f7.tar
initscripts-51802a966d90440f7a644ee318d9a47a31e768f7.tar.gz
initscripts-51802a966d90440f7a644ee318d9a47a31e768f7.tar.bz2
initscripts-51802a966d90440f7a644ee318d9a47a31e768f7.tar.xz
initscripts-51802a966d90440f7a644ee318d9a47a31e768f7.zip
add an 'unconfigure' sort of thing.
-rwxr-xr-xrc.d/rc.sysinit38
1 files changed, 38 insertions, 0 deletions
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