[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 18 May 2016 at 07:59, Anton Zinoviev <anton@lml.bas.bg> wrote:
> On Wed, May 11, 2016 at 01:27:52PM -0300, Felipe Sateler wrote:
>>
>> Sure. Also, feel free to point me to what you have, and I can comment
>> on that as well.
>
> I've pushed the changes I made in git. The new version of
> keyboard-setup.service is more or less unchanged:
>
> [Unit]
> Description=Set the console keyboard layout
> DefaultDependencies=no
> Before=local-fs-pre.target
> Wants=local-fs-pre.target
> ConditionPathExists=/bin/setupcon
>
> [Service]
> Type=oneshot
> ExecStart=/lib/console-setup/keyboard-setup.sh
> RemainAfterExit=yes
>
> [Install]
> WantedBy=sysinit.target

This looks good to me.

> As for console-setup.service, this script doesn't actually configure the
> console (that is on Linux; on FreeBSD it does).  Therefore, I removed
> the instructions Before=system-getty.slice and WantedBy=sysinit.target.
> The actual configuration of the console is accomplished by udev (see
> /lib/udev/rules.d/90-console-setup.rules).

Ok. I see that the rules file appears to invoke the scripts in /etc
directly. Is this intended (IOW, shouldn't they invoke the wrappers at
/lib/console-setup)?

>
>> > 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.
>
> I suppose this is so only on Debian?  In order to support other
> nonstandard/future distributions I added this instruction.

It does no harm, so it is OK to leave there. But upstream systemd and
udev have pushed for mounting /usr in the initramfs for a long time,
so it is unlikely a systemd-based system will not have /usr mounted,
except as a misconfiguration.

>  So, now
> console-setup.service looks in this way:
>
> [Unit]
> Description=Set console font and keymap
> DefaultDependencies=no
> After=console-screen.service kbd.service local-fs.target
> RequiresMountsFor=/usr
> ConditionPathExists=/bin/setupcon
>
> [Service]
> Type=oneshot
> ExecStart=/lib/console-setup/console-setup.sh
> RemainAfterExit=yes


Note that because it has no WantedBy line, this service will not be
actually executed during boot. If the service should run as part of
normal system boot, it should have either WantedBy=sysinit.target or
WantedBy=multi-user.target.
Services WantedBy=sysinit.target will be pulled in both single user
and multi user boots. Services in multi-user.target will only be
pulled in multi user boots.

-- 

Saludos,
Felipe Sateler


Reply to: