Bug#796603: Fwd: Bug#796603: keyboard-configuration: Has init script in runlevel S but no matching service file
Control: tags -1 patch
Missed the bug cc, sorry for the duplicate.
On 1 September 2015 at 17:54, Michael Biebl <biebl@debian.org> wrote:
> Am 01.09.2015 um 19:38 schrieb Felipe Sateler:
>> On 1 September 2015 at 14:05, Anton Zinoviev <anton@lml.bas.bg> wrote:
>>> On Thu, Aug 27, 2015 at 03:18:17PM -0300, Felipe Sateler wrote:
>>>>
>>>> Does console-setup actually need to be run before user services are
>>>> started? My guess is that it only needs to run before getty, but it
>>>> should not block other services that want to start.
>>>
>>> It should run before fsck.
>>
>> That is definitely not what the init script says[1]:
>>
>> # Provides: console-setup
>> # Required-Start: $remote_fs
>
> Right, the $remote_fs dependency means it's actually started pretty late.
> I guess what Anton meant was keyboard-setup.
OK, so I added 2 service files, and preserved the early startup. However:
1. keyboard-setup is setup very early at boot, before
local-fs-pre.target so that it occurs before fsck (at least the ones
that don't happen in the initrd).
2. The ordering on console-setup is relaxed so that it starts early,
but after /usr and /usr/local are mounted and the root fs is remounted
(so that it can be saved in /etc). At the same time, this will not
delay any further services except the gettys by being
Before=system-getty.slice (BTW, maybe we need a getty-pre.target?).
Review welcome.
--
Saludos,
Felipe Sateler
From 7ed5dcd10e76b25304ca2584cd828be4aa61e61c Mon Sep 17 00:00:00 2001
From: Felipe Sateler <fsateler@debian.org>
Date: Sat, 10 Oct 2015 08:40:50 -0300
Subject: [PATCH] Add systemd units
---
debian/changelog | 7 +++++++
debian/keyboard-configuration.console-setup.service | 14 ++++++++++++++
debian/keyboard-configuration.keyboard-setup.service | 14 ++++++++++++++
debian/rules | 8 ++++++++
4 files changed, 43 insertions(+)
create mode 100644 debian/keyboard-configuration.console-setup.service
create mode 100644 debian/keyboard-configuration.keyboard-setup.service
diff --git a/debian/changelog b/debian/changelog
index 73796fb..6b8dae1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+console-setup (1.133+nmu1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Add systemd units
+
+ -- Felipe Sateler <fsateler@debian.org> Thu, 08 Oct 2015 20:18:37 -0300
+
console-setup (1.133) unstable; urgency=medium
[ Updated translations ]
diff --git a/debian/keyboard-configuration.console-setup.service b/debian/keyboard-configuration.console-setup.service
new file mode 100644
index 0000000..67af770
--- /dev/null
+++ b/debian/keyboard-configuration.console-setup.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Set console font and keymap
+DefaultDependencies=no
+After=console-screen.service kbd.service local-fs.target
+Before=system-getty.slice
+RequiresMountsFor=/usr /usr/local
+
+[Service]
+Type=oneshot
+EnvironmentFile=-/etc/default/locale
+ExecStart=/bin/setupcon --save
+
+[Install]
+WantedBy=sysinit.target
diff --git a/debian/keyboard-configuration.keyboard-setup.service b/debian/keyboard-configuration.keyboard-setup.service
new file mode 100644
index 0000000..d50247b
--- /dev/null
+++ b/debian/keyboard-configuration.keyboard-setup.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Set preliminary keymap
+DefaultDependencies=no
+Before=local-fs-pre.target
+Wants=local-fs-pre.target
+After=udev.service keymap.service
+
+[Service]
+Type=oneshot
+EnvironmentFile=-/etc/default/locale
+ExecStart=/bin/setupcon -k
+
+[Install]
+WantedBy=sysinit.target
diff --git a/debian/rules b/debian/rules
index d709312..1982d0d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -145,10 +145,18 @@ install-main: build
usr/share/console-setup/
dh_link -pkeyboard-configuration usr/share/X11/xkb/rules/xorg.lst \
usr/share/doc/keyboard-configuration/xorg.lst
+ dh_systemd_enable -pkeyboard-configuration \
+ --name keyboard-setup
+ dh_systemd_enable -pkeyboard-configuration \
+ --name console-setup
dh_installinit -pkeyboard-configuration \
--no-start --name keyboard-setup -- start 06 S .
dh_installinit -pkeyboard-configuration \
--no-start --name console-setup -- start 49 S .
+ dh_systemd_start -pkeyboard-configuration \
+ --no-start --name keyboard-setup
+ dh_systemd_start -pkeyboard-configuration \
+ --no-start --name console-setup
.PHONY : install-bdf2psf
install-bdf2psf: build
--
2.6.0
Reply to: