Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Sep 2002 10:26:40 +0200 (CEST)
From:      Oliver Fromme <olli@secnetix.de>
To:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Restart multi-user mode automatically
Message-ID:  <200209200826.g8K8QeqO095385@lurza.secnetix.de>
In-Reply-To: <200209191140.g8JBeeam051096@lurza.secnetix.de>

next in thread | previous in thread | raw e-mail | index | archive | help
Sorry for replying to myself, but I wanted this to make it
into the list archive, in case someone else is having the same
problem some day ...

Oliver Fromme <olli@secnetix.de> wrote:
 > This might seem like a strange question, but maybe someone
 > has an answer or idea ...
 > 
 > Under certain circumstances, I need to restart a machine's
 > multi-user mode without manual intervention.  In other words,
 > it should perform a shutdown, killing all processes, but then
 > (instead of prompting for a single-user mode shell), the system
 > should get back up into multi-user mode automatically (running
 > /etc/rc etc).  I do not want to perform a full reboot.
 > 
 > Is there a way to do that?

I finally took an hour to study the source code of /sbin/init.
There doesn't seem to be a way to do what I need, because
there is no state transition multiuser -> death -> multiuser
without a singleuser in between.  :-(

So the answer to my question is "no".  However, from looking
at the source code it seems to be pretty easy to write a small
tool that "simulates" parts of init and performs exactly what
I need.  That's what I will do.

Regards
   Oliver

PS:  No, it is _not_ for avoiding a reboot to save the
machine's uptime, but to keep downtimes of services to the
absolute minimum possible.  A reboot takes several minutes,
but shutdown -> ^D -> multiuser is a matter of seconds.

-- 
Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

"All that we see or seem is just a dream within a dream" (E. A. Poe)

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




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