[2019-01-25 10:34] Andras Korn <[email protected]>
> I believe instead of
>
> rm /etc/service/getty-@TTY@
>
> you should do
>
> rm "$(pwd)"
>
> because then it won't matter what the service is called and where the
> runsvdir root is (/etc/service or somewhere else).

I find it unsafe. Explicit is better implicit.

> Also, this seems redundant:
>
> #!/usr/bin/env /lib/runit/invoke-run
>
> why not just "#!/lib/runit/invoke-run"?

Because kFreeBSD kernel requires script interpreter to be compiled.
Portability.

> While invoke-run, as an interpreter, is an original idea, I'd make it a
> scriptlet a run script can source via ". /lib/runit/invoke-run". Then it
> wouldn't be necessary to export all variables the configuration sets and
> thereby clutter the environment of the daemon.
>
> The envdir bit could be handled by a construct like
>
> if [ -z "$1" ]; then
>       SVDIR="$(dirname $(readlink -f "$0")"
>       if [ -e "$SVDIR/conf" ]; then
>               exec chpst -e "$SVDIR/conf" -- "$0" "envdir-done"
> fi

Complicated. And depends on $0 trickery. We, at sysvinit team, had
problems with $0 trickery.

What is so bad about cluttering environment of daemon?

> (But then /etc/default/foo would have to take precedence over sv/foo/conf,
> because the /etc/default/foo variables would be lost during the exec since
> we want to avoid exporting them.)

This too. I want daemontools-style take precedence over sysvinit style.

> > 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
>
> While this would work, it doesn't improve my situation: you're making me
> jump through hoops to get sensible behaviour. Creating these files isn't
> less effort than deleting the getty services on installation, so it just
> adds complexity and abstraction with no real benefit.

Not exactly. You mentioned that option to pre-seed debconf would help
you. I provide you with way to pre-provision system -- create
/etc/default/getty-tty{1..6} before installing runit.

After installing getty-run, you would get behaviour you want. Or I
missed the point?

> I still think the postinst modification I suggested (not installing
> getty services for non-existing tty devices) would be the cleanest
> solution.

And what if there were no tty on installation time, and after that they
appeared? (No idea, why, never dealt with devices without tty.)

As you can understand, I am wary about defaulting on behavior, that can
leave user without means to login.
-- 
        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