summaryrefslogtreecommitdiffstats
path: root/abs/core/systemd/0007-fsck-root-only-run-when-requested-in-fstab.patch
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2014-02-17 00:01:05 (GMT)
committerJames Meyer <james.meyer@operamail.com>2014-02-19 19:03:04 (GMT)
commit84a8c2bb49e91f5e94c2c6c7245172994f517a91 (patch)
treee309992948648f2fabf4c7591c5dc805df23e291 /abs/core/systemd/0007-fsck-root-only-run-when-requested-in-fstab.patch
parent7083b169234e350cec8ad3213b3e4a07e078a36d (diff)
downloadlinhes_pkgbuild-84a8c2bb49e91f5e94c2c6c7245172994f517a91.zip
linhes_pkgbuild-84a8c2bb49e91f5e94c2c6c7245172994f517a91.tar.gz
linhes_pkgbuild-84a8c2bb49e91f5e94c2c6c7245172994f517a91.tar.bz2
systemd: 208
Diffstat (limited to 'abs/core/systemd/0007-fsck-root-only-run-when-requested-in-fstab.patch')
-rw-r--r--abs/core/systemd/0007-fsck-root-only-run-when-requested-in-fstab.patch95
1 files changed, 95 insertions, 0 deletions
diff --git a/abs/core/systemd/0007-fsck-root-only-run-when-requested-in-fstab.patch b/abs/core/systemd/0007-fsck-root-only-run-when-requested-in-fstab.patch
new file mode 100644
index 0000000..112b5b5
--- /dev/null
+++ b/abs/core/systemd/0007-fsck-root-only-run-when-requested-in-fstab.patch
@@ -0,0 +1,95 @@
+From a7623afb7a48ab1d7b5b24fbd5f1033acfb2301c Mon Sep 17 00:00:00 2001
+From: Tom Gundersen <teg@jklm.no>
+Date: Sat, 19 Oct 2013 11:38:42 +0200
+Subject: [PATCH 7/7] fsck-root: only run when requested in fstab
+
+fsck-root is redundant in case an initrd is used, or in case the rootfs
+is never remounted 'rw', so the new default is the correct behavior for
+most users. For the rest, they should enable it in fstab.
+---
+ Makefile.am | 1 -
+ man/systemd-fsck@.service.xml | 4 +++-
+ src/fstab-generator/fstab-generator.c | 31 ++++++++++++++++++++++---------
+ 3 files changed, 25 insertions(+), 11 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index ca01179..a29a32a 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -4447,7 +4447,6 @@ SYSINIT_TARGET_WANTS += \
+ systemd-update-utmp.service
+ LOCAL_FS_TARGET_WANTS += \
+ systemd-remount-fs.service \
+- systemd-fsck-root.service \
+ tmp.mount
+ MULTI_USER_TARGET_WANTS += \
+ getty.target \
+diff --git a/man/systemd-fsck@.service.xml b/man/systemd-fsck@.service.xml
+index 17bd1c0..811392b 100644
+--- a/man/systemd-fsck@.service.xml
++++ b/man/systemd-fsck@.service.xml
+@@ -63,7 +63,9 @@
+ check. <filename>systemd-fsck-root.service</filename> is
+ responsible for file system checks on the root
+ file system. The root file system check is performed
+- before the other file systems.</para>
++ before the other file systems. Either service is enabled
++ at boot if passno in <filename>/etc/fstab</filename> for
++ the filesystem is set to a value greater than zero.</para>
+
+ <para><filename>systemd-fsck</filename> will
+ forward file system checking progress to the
+diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c
+index 77247de..78d7609 100644
+--- a/src/fstab-generator/fstab-generator.c
++++ b/src/fstab-generator/fstab-generator.c
+@@ -210,17 +210,29 @@ static int add_mount(
+ post);
+
+ if (passno > 0) {
+- _cleanup_free_ char *fsck = NULL;
++ if (streq(where, "/")) {
++ lnk = strjoin(arg_dest, "/", SPECIAL_LOCAL_FS_TARGET, ".wants/", "systemd-fsck-root.service", NULL);
++ if (!lnk)
++ return log_oom();
+
+- fsck = unit_name_from_path_instance("systemd-fsck", what, ".service");
+- if (!fsck)
+- return log_oom();
++ mkdir_parents_label(lnk, 0755);
++ if (symlink("systemd-fsck-root.service", lnk) < 0) {
++ log_error("Failed to create symlink %s: %m", lnk);
++ return -errno;
++ }
++ } else {
++ _cleanup_free_ char *fsck = NULL;
+
+- fprintf(f,
+- "Requires=%s\n"
+- "After=%s\n",
+- fsck,
+- fsck);
++ fsck = unit_name_from_path_instance("systemd-fsck", what, ".service");
++ if (!fsck)
++ return log_oom();
++
++ fprintf(f,
++ "Requires=%s\n"
++ "After=%s\n",
++ fsck,
++ fsck);
++ }
+ }
+
+
+@@ -248,6 +260,7 @@ static int add_mount(
+
+ if (!noauto) {
+ if (post) {
++ free(lnk);
+ lnk = strjoin(arg_dest, "/", post, nofail || automount ? ".wants/" : ".requires/", name, NULL);
+ if (!lnk)
+ return log_oom();
+--
+1.8.5.1
+