Commit e7a543d6 authored by Jon Severinsson's avatar Jon Severinsson Committed by Sjoerd Simons
Browse files

Do not order rcS.d services after local-fs.target if they do not explicitly depend on $local_fs.

parent a8441d31
......@@ -19,6 +19,8 @@ systemd (214-1) UNRELEASED; urgency=medium
* Try-restart networkd, resolved, and timesyncd after an upgrade.
* Do not force-enable default-on services on every upgrade.
* Add support for rcS.d init scripts to the sysv-generator.
- Do not order rcS.d services after local-fs.target if they do not
explicitly depend on $local_fs.
[ Sjoerd Simons ]
* debian/patches/shared-include-stdbool.h-in-mkdir.h.patch
......
From: Jon Severinsson <jon@severinsson.net>
Date: Thu, 3 Jul 2014 18:00:00 +0200
Subject: Do not order rcS.d services after local-fs.target if they do not
explicitly depending on $local_fs.
---
man/systemd.special.xml | 9 +++++++++
src/insserv-generator/insserv-generator.c | 2 +-
src/shared/special.h | 2 +-
src/sysv-generator/sysv-generator.c | 7 ++-----
4 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/man/systemd.special.xml b/man/systemd.special.xml
index 2ff64c9..7f7e168 100644
--- a/man/systemd.special.xml
+++ b/man/systemd.special.xml
@@ -369,6 +369,15 @@
that have the
<option>auto</option> mount
option set.</para>
+
+ <para>systemd automatically
+ adds dependencies of type
+ <varname>After=</varname> for
+ this target unit to all SysV
+ init script service units with
+ an LSB header referring to the
+ <literal>$local_fs</literal>
+ facility.</para>
</listitem>
</varlistentry>
<varlistentry>
diff --git a/src/insserv-generator/insserv-generator.c b/src/insserv-generator/insserv-generator.c
index d86ee29..6c10735 100644
--- a/src/insserv-generator/insserv-generator.c
+++ b/src/insserv-generator/insserv-generator.c
@@ -62,7 +62,7 @@ static int sysv_translate_facility(const char *name, const char *filename, char
static const char * const table[] = {
/* LSB defined facilities */
- "local_fs", NULL,
+ "local_fs", SPECIAL_LOCAL_FS_TARGET,
"network", SPECIAL_NETWORK_TARGET,
"named", SPECIAL_NSS_LOOKUP_TARGET,
"portmap", SPECIAL_RPCBIND_TARGET,
diff --git a/src/shared/special.h b/src/shared/special.h
index 2fe5db5..9c22f19 100644
--- a/src/shared/special.h
+++ b/src/shared/special.h
@@ -49,7 +49,7 @@
#define SPECIAL_BUSNAMES_TARGET "busnames.target"
#define SPECIAL_TIMERS_TARGET "timers.target"
#define SPECIAL_PATHS_TARGET "paths.target"
-#define SPECIAL_LOCAL_FS_TARGET "local-fs.target"
+#define SPECIAL_LOCAL_FS_TARGET "local-fs.target" /* LSB's $local_fs */
#define SPECIAL_LOCAL_FS_PRE_TARGET "local-fs-pre.target"
#define SPECIAL_INITRD_FS_TARGET "initrd-fs.target"
#define SPECIAL_INITRD_ROOT_FS_TARGET "initrd-root-fs.target"
diff --git a/src/sysv-generator/sysv-generator.c b/src/sysv-generator/sysv-generator.c
index 22d9cc2..820d79e 100644
--- a/src/sysv-generator/sysv-generator.c
+++ b/src/sysv-generator/sysv-generator.c
@@ -73,9 +73,6 @@ static const struct {
UP must be read before DOWN */
};
-/* Sysinit services uses DefaultDependencies=no, so explicitly order after a safe subset. */
-#define SYSINIT_AFTER "local-fs.target"
-
typedef struct SysvStub {
char *name;
char *path;
@@ -165,7 +162,7 @@ static int generate_unit_file(SysvStub *s) {
s->path, s->description);
if (s->sysinit)
- fprintf(f, "DefaultDependencies=no\nAfter=" SYSINIT_AFTER "\n");
+ fprintf(f, "DefaultDependencies=no\n");
if (!isempty(before))
fprintf(f, "Before=%s\n", before);
if (!isempty(after))
@@ -246,7 +243,7 @@ static int sysv_translate_facility(const char *name, const char *filename, char
static const char * const table[] = {
/* LSB defined facilities */
- "local_fs", NULL,
+ "local_fs", SPECIAL_LOCAL_FS_TARGET,
"network", SPECIAL_NETWORK_ONLINE_TARGET,
"named", SPECIAL_NSS_LOOKUP_TARGET,
"portmap", SPECIAL_RPCBIND_TARGET,
......@@ -100,3 +100,4 @@ Add-run-initctl-support-to-SysV-compat-tools.patch
Add-support-for-TuxOnIce-hibernation.patch
Add-support-for-rcS.d-init-scripts-to-the-sysv-gener.patch
Do-not-generate-systemd-units-from-sysv-init-scripts.patch
Do-not-order-rcS.d-services-after-local-fs.target-if.patch
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment