[systemd-devel] emergency vs. rescue

Lennart Poettering lennart at poettering.net
Wed Sep 8 03:38:45 PDT 2010


On Tue, 07.09.10 13:18, Bill Nottingham (notting at redhat.com) wrote:

> 
> Lennart Poettering (lennart at poettering.net) said: 
> > > It reads confusingly, in that if sysinit is 'Before' emergency, the
> > > implication would be that if you enable emergency mode, sysinit would be
> > > started before it. It isn't, as the dependency isn't there.
> > 
> > sysinit.target has a Conflicts with emergency.target.
> 
> Not currently in the packages here; sysinit only conflicts with
> shutdown.

Oh. Uh. By bit means of "isolate" it gains that....

> > > Two other emergency points:
> > > - it doesn't have the same sort of boot alias as 'single'. If you're
> > >   going for compat with old sysvinit, it should have an 'emergency' alias
> > >   (that leaves out systemd.unit=....)
> > 
> > Hmm, not sure I follow? This emergency mode didn't really exist in
> > sysv.
> 
> If sysvinit is passed 'emergency' on the command line, it starts a shell.
> (This is all done in init itself, not inittab or other configuration.)

Oh, I wasn't aware of that. I have now added this to systemd git. Thanks
for the pointer.

> > > - respawn is pretty pointless here (as it is for rescue). It should
> > >   just have ExecStartPost=/bin/systemctl default
> > 
> > Hmm, you have a point there. I need to think about this.
> 
> That line works fine for rescue mode in testing... it should work OK for
> emergency mode (as long as it's started during boot and not later - perhaps
> emergency should have RefuseManualStart=yes?)

Hmm, my long term plan is to make the boot scripts fully idempotent so
that we can execute them twice in a row and they work fine. I think they
mostly work fine that way already with the exception of fsck which fails
when executed a second time because the file systems might be mounted or
mounted writable.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list