[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: single-user mode scripting

On Wed, Jul 17, 2002 at 09:04:40PM -0400, Woodchuck wrote:

> On Wed, 17 Jul 2002, Russell Garrison wrote:
> > I am  running OpenBSD 3.1  and working on a  failover firewall
> > where a secondary machine takes over the address for a primary
> > in the event of a failure.  In  order to set the MAC I have to
> > take the  system down into  single-user mode, set the  MAC and
> > then  bring  the  system  back up  to  start  services  again.
> > Ideally, this should all be  accomplished with a script, but I
> > am unsure how  to do this since switching to  single will kill
> > all processes.
> There   might   be   a   better   way  to   do   it,   but   the
> off-the-top-of-my-pointy-head method  is this:  (This  is rather
> general for  your specific task,  there may  be a clever  way to
> accomplish what  you want, such as  a kernel hack of  some kind,
> adding a custom sysctl, say.)

Er...what you suggest is waaay more complicated than is necessary.

It's quite  simple, really. The  details are  in shutdown  (8) and
rc.shutdown (8).

There's no need to reboot  after a shutdown, either--just exit the
shell and the system comes bak up.



Ben Goren

[demime 0.98d removed an attachment of type application/pgp-signature]