chiark / gitweb /
Add fsckd service and socket, retarget systemd-fsck
authorDidier Roche <didrocks@ubuntu.com>
Mon, 26 Jan 2015 16:30:00 +0000 (17:30 +0100)
committerMartin Pitt <martin.pitt@ubuntu.com>
Wed, 18 Feb 2015 15:33:46 +0000 (16:33 +0100)
systemd-fsckd can be socket-activated by systemd-fsck process. Reflect that
in the different unit files.

Makefile.am
units/.gitignore
units/systemd-fsck-root.service.in
units/systemd-fsck@.service.in
units/systemd-fsckd.service.in [new file with mode: 0644]
units/systemd-fsckd.socket [new file with mode: 0644]

index a15b53b94a9ca7c2cf85e056a77c48f852705d7c..d9d71df9efb87fd11cf4071a0343bef3e92f8e1c 100644 (file)
@@ -494,6 +494,7 @@ dist_systemunit_DATA = \
        units/slices.target \
        units/system.slice \
        units/x-.slice \
+       units/systemd-fsckd.socket \
        units/systemd-initctl.socket \
        units/systemd-shutdownd.socket \
        units/syslog.socket \
@@ -545,6 +546,7 @@ nodist_systemunit_DATA = \
        units/systemd-kexec.service \
        units/systemd-fsck@.service \
        units/systemd-fsck-root.service \
+       units/systemd-fsckd.service \
        units/systemd-machine-id-commit.service \
        units/systemd-udevd.service \
        units/systemd-udev-trigger.service \
@@ -598,6 +600,7 @@ EXTRA_DIST += \
        units/user/systemd-exit.service.in \
        units/systemd-fsck@.service.in \
        units/systemd-fsck-root.service.in \
+       units/systemd-fsckd.service.in \
        units/systemd-machine-id-commit.service.in \
        units/user@.service.m4.in \
        units/debug-shell.service.in \
index 6fdb629c3d664c16167397e0d15811db52d85458..26ae96585307c19b251c5a15f1468eb9514f4aa0 100644 (file)
@@ -28,6 +28,7 @@
 /systemd-firstboot.service
 /systemd-fsck-root.service
 /systemd-fsck@.service
+/systemd-fsckd.service
 /systemd-machine-id-commit.service
 /systemd-halt.service
 /systemd-hibernate.service
index 6d7657853ed64dcbc49f1c72452f299e8a5101f8..f493445b86465b6908a6adf4cc623959abdc6bfa 100644 (file)
@@ -9,12 +9,13 @@
 Description=File System Check on Root Device
 Documentation=man:systemd-fsck-root.service(8)
 DefaultDependencies=no
+Wants=systemd-fsckd.socket
 Before=local-fs.target shutdown.target
+After=systemd-fsckd.socket
 ConditionPathIsReadWrite=!/
 
 [Service]
 Type=oneshot
 RemainAfterExit=yes
 ExecStart=@rootlibexecdir@/systemd-fsck
-StandardOutput=journal+console
 TimeoutSec=0
index 857e625679d8c154b484e691bceec90fe2efdbe7..e6d98c031b4770ac20872fb99e1c1d7670d840ec 100644 (file)
@@ -10,12 +10,12 @@ Description=File System Check on %f
 Documentation=man:systemd-fsck@.service(8)
 DefaultDependencies=no
 BindsTo=%i.device
-After=%i.device systemd-fsck-root.service local-fs-pre.target
+Wants=systemd-fsckd.socket
+After=%i.device systemd-fsck-root.service local-fs-pre.target systemd-fsckd.socket
 Before=shutdown.target
 
 [Service]
 Type=oneshot
 RemainAfterExit=yes
 ExecStart=@rootlibexecdir@/systemd-fsck %f
-StandardOutput=journal+console
 TimeoutSec=0
diff --git a/units/systemd-fsckd.service.in b/units/systemd-fsckd.service.in
new file mode 100644 (file)
index 0000000..27c325f
--- /dev/null
@@ -0,0 +1,16 @@
+#  This file is part of systemd.
+#
+#  systemd is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU Lesser General Public License as published by
+#  the Free Software Foundation; either version 2.1 of the License, or
+#  (at your option) any later version.
+
+[Unit]
+Description=File System Check Daemon to report status
+DefaultDependencies=no
+Requires=systemd-fsckd.socket
+Before=shutdown.target
+
+[Service]
+ExecStart=@rootlibexecdir@/systemd-fsckd
+StandardOutput=journal+console
diff --git a/units/systemd-fsckd.socket b/units/systemd-fsckd.socket
new file mode 100644 (file)
index 0000000..a8994a1
--- /dev/null
@@ -0,0 +1,14 @@
+#  This file is part of systemd.
+#
+#  systemd is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU Lesser General Public License as published by
+#  the Free Software Foundation; either version 2.1 of the License, or
+#  (at your option) any later version.
+
+[Unit]
+Description=fsck to fsckd communication Socket
+Documentation=man:systemd-fsck@.service(8) man:systemd-fsck-root.service(8)
+DefaultDependencies=no
+
+[Socket]
+ListenStream=/run/systemd/fsckd