:: Re: [DNG] ideas for system startup …
Top Pagina
Delete this message
Reply to this message
Auteur: Steve Litt
Datum:  
Aan: dng
Onderwerp: Re: [DNG] ideas for system startup (was: Init scripts in packages)
On Fri, 7 Aug 2015 17:06:14 -0700
Gregory Nowak <greg@???> wrote:


> This is something that systemd did, and one of the things about it
> that really ticked me off. Let me provide a couple of examples:
>
> 1. One of the things I did when playing with debian jessie was to
> install a virtual machine which would be accessed only via serial
> console and ssh (this is a real use case for me). I discovered that
> there is no /etc/inittab in debian jessie!


/etc/inittab is unique to sysvinit and OpenRC (which uses sysvinit as
PID1). If we're ever forced to move to another (besides systemd) init,
we won't have /etc/inittab either, but we'll still be able to do
everything we did with sysvinit, just differently.


> Second, I discovered that
> while I can remove agetty on tty1, I can't do so on tty2-tty6, because
> systemd insists I should have a login console wherever possible.


Far be it from me to defend systemd, but there's probably a way to
shut off the ttys.

>
> 2. I want ctrl+alt+del to do shutdown -h, instead of shutdown -r
> (another real use case on another virtual system).


:-) I can do that on any system that's initted with Suckless Init :-)

Beyond that, I can't be of help.

> I couldn't figure
> out a way to do this in debian jessie.


Yeah, you have to have PID1 to run shutdown -h (poweroff, or whatever)
on receipt of that interrupt. I think the PID1 has to support that.

>
> Now, what you proposed above from what I understand should work for my
> first example. The admin would do something like tty1.agetty stop,
> followed by tty1.agetty disable. Nice, simpler then open inittab in an
> editor, and commenting out lines, followed by telinit q. However, I
> don't see how your proposal above would deal with defining what
> ctrl+alt+del does per my second example. Handling such events isn't
> as simple as starting/stopping a daemon with a universal init
> script. Since you mentioned getting rid of most of inittab but not all
> of it, would ctrl+alt+del be one of the things you envision inittab
> still being useful for?


I didn't read the whole thread, but if sysvinit now is capable of doing
what you want with sysvinit, and you use sysvinit as PID1 but then use
something else to manage the processes, then sysvinit should handle
interrupts sent its way in the same manner it always has.

SteveT

Steve Litt
July 2015 featured book: Rapid Learning for the 21st Century
http://www.troubleshooters.com/rl21