Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Dec 1998 20:21:09 -0600 (CST)
From:      Rich Winkel <rich@chumbly.math.missouri.edu>
To:        freebsd-stable@FreeBSD.ORG
Subject:   accessing quiescent fbsd machine via network for maintenance
Message-ID:  <199812030221.UAA21832@chumbly.math.missouri.edu>

next in thread | raw e-mail | index | archive | help
I'm running FBSD 2.2.7-stable.
For various reasons I'd like to be able to upgrade fbsd machines without
having to be seated in front of them.  Specifically, I want to reboot
into a mode where only a minimal amount of system activity is
occurring, regular users are excluded, but remote root access and nfs
mounts are allowed.  This would allow me to login, mount a remote /usr/src
& /usr/obj, run "make installworld" and install a new kernel.
But this seems to be problematic.  I can do it at the console by
rebooting singleuser and running fsck, swapon, ifconfig and mount, but
I have problems when I try to do it with a modified /etc/rc.
Specifically, in /etc/rc I check for the existence of the file
/etc/netmaintboot immediately after the network_pass1 call.  If the
file exists I execute /etc/rc.netmaint and exit 0.  
/etc/rc.netmaint consists of:

#!/bin/sh
# boot configured for maintenance from network
ldconfig /usr/lib
echo "Down for maintenance, try again later" > /etc/nologin
TERM=cons25 clear
echo "Entering maintenance mode, please don't touch"
/sbin/sshd -b 1024 &
exit 0

But for some reason sshd dies immediately and I can't login.  But if I
then login at the console and run sshd manually it works fine.

Any ideas??  Do you think this kind of capability should be incorporated
into a future release?

Thanks!!
Rich


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199812030221.UAA21832>