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 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
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).
> > 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. 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
Anton Zinoviev
Reply to: