[2019-01-18 20:27] Andras Korn <korn-debb...@elan.rulez.org>
> sorry, didn't look at bug mail for a while.
>
> > > However, whenever the getty-run package is installed in a vserver, I have 
> > > to
> > > manually remove the /service/getty-tty* symlinks.
> > >
> > > Can you please modify the postinst script so it only installs getty 
> > > services
> > > for /dev/tty* devices that are actually there?
> > 
> > I do not like maintainer scripts. They are pain to get right.  I can
> > propose you to pre-provision your servers with
> > `/etc/sv/getty{1-6}-run/down' file. See runsv(8).
>
> That would still leave the runsv processes around and clutter the output of
> "sv status /service/*".
>
> The following postinst snippet should work:
>
> export NAME='getty-tty1'
> if [ -c /dev/tty1 ]; then
>       export ENABLE='yes'
> else
>       export ENABLE='no'
> fi
>
> # Unlike postrm, I can be sure, that runit-helper is present on
> # postinst.
> /lib/runit-helper/runit-helper postinst "$@"
>
> ... and so on for the other ttys. (A lesser man would have used a for loop. :)
>
> (Alternatively, the getty run scripts could start with something like this:
>
> [ -c /dev/ttyX ] || rm /etc/service/getty-ttyX
>
> and /etc/runit/1 could re-create these symlinks, just to be absolutely sure.
>
> I don't like this approach; there is too much going on automatically.)
>
> Or, you could add a debconf question with low priority, defaulting to "yes",
> on whether to add the getty service symlinks. I could pre-seed debconf in
> vservers with "no".

I believe I found quite decent solution. Take a look at `bugfix/914788'
branch.

Please,

 * build it (it will build runit-2.1.2-22, sorry for version havoc)
 * install bin:runit
 * install bin:getty-run
 * write "yes" into /etc/getty-tty1/conf/GIVE_UP_ON_MISSING_TTY file
 * did it help?
-- 
        Note, that I send and fetch email in batch, once every 24 hours.
                 If matter is urgent, try https://t.me/kaction
                                                                             --

Reply via email to