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

Bug#796603: Questions about console-setup.service (Re: Bug#796603: closed by Anton Zinoviev <zinoviev@debian.org> (Bug#796603: fixed in console-setup 1.138))



On 11 May 2016 at 11:18, Anton Zinoviev <anton@lml.bas.bg> wrote:
> On Wed, Mar 16, 2016 at 03:22:42PM -0300, Felipe Sateler wrote:
>>
>> > On Sun, Mar 06, 2016 at 02:51:34PM -0300, Felipe Sateler wrote:
>> >>
>> >> I meant the logic to determine if setupcon or the cached scripts
>> >> should be run. If in the future that part is changed (eg, the names
>> >> are changed, or more scripts are generated), there is no guarantee
>> >> the change will reach users, since they may have modified the init
>> >> script.
>
> Right now I am preparing some changes in console-setup and one of them
> is to implement your suggestion to move the logic out of the init
> scripts.

Excellent.

>
>> Would you be OK, until further development comes along, to use a
>> wrapper unit like this:
>
> And while I am reviewing your changes, I find (as expected) that there
> are things I don't understand.  So before I make changes and introduce
> bugs, I decided to ask.

Sure. Also, feel free to point me to what you have, and I can comment
on that as well.

>
>> [Install]
>> WantedBy=sysinit.target
>
> What is the purpose of this instruction?  Wouldn't it be possible to
> remove it at least for console-setup.service?

WantedBy is the equivalent of the LSB Default-Start directive. This
means that when the unit is enabled, it will be pulled in whenever
sysinit.target is started.

sysinit.target roughly corresponds to runlevel S. In particular, it is
both pulled in by multi user and single user boots, which AFAICT is
what we want for console-setup.

Note that Wants relationships do not mean anything for ordering: this
instruction does not specify that console-setup must finish for
sysinit.target to be considered active.

>
> Also, inside console-setup.service I find these:
>
>> After=console-screen.service kbd.service local-fs.target
>
> What about the following additional instruction: RequiresMountsFor=/usr

It would be redundant, as /usr is guaranteed to be mounted by the
initramfs (for stretch, both dracut and initramfs-tools do so). It
would cause no harm, though.

Split-/usr without an initramfs that mounts /usr is not supported and
is likely to break.

>
>> Before=system-getty.slice
>
> Nothing really serious is going to happen if this script is executed
> after getty.  Wouldn't it be better to remove this instruction?

The idea behind it was to guarantee console-setup had run before the
user could login to a console. Maybe it is not strictly necessary, but
I think it provides good user experience.

-- 

Saludos,
Felipe Sateler


Reply to: