summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--man/systemd.unit.xml14
-rw-r--r--src/automount.c2
-rw-r--r--src/job.c17
-rw-r--r--src/load-fragment.c1
-rw-r--r--src/manager.c2
-rw-r--r--src/mount.c2
-rw-r--r--src/path.c2
-rw-r--r--src/service.c4
-rw-r--r--src/socket.c2
-rw-r--r--src/swap.c2
-rw-r--r--src/target.c2
-rw-r--r--src/timer.c2
-rw-r--r--src/unit.c6
-rw-r--r--src/unit.h3
-rw-r--r--units/final.target1
-rw-r--r--units/shutdown.target1
-rw-r--r--units/umount.target1
17 files changed, 15 insertions, 49 deletions
diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml
index ff1b47f9fb..4e1d9f3070 100644
--- a/man/systemd.unit.xml
+++ b/man/systemd.unit.xml
@@ -544,20 +544,6 @@
</varlistentry>
<varlistentry>
- <term><varname>IgnoreDependencyFailure=</varname></term>
-
- <listitem><para>Takes a boolean
- argument. If <option>true</option> and
- a requirement dependency of this unit
- fails to start up this unit will be
- started nonetheless, ignoring that
- failure. If <option>false</option>
- (the default) and a dependency unit
- fails the unit will immediately fail
- too and the job is removed.</para></listitem>
- </varlistentry>
-
- <varlistentry>
<term><varname>JobTimeoutSec=</varname></term>
<listitem><para>When clients are
diff --git a/src/automount.c b/src/automount.c
index da66630fd6..462f3170ba 100644
--- a/src/automount.c
+++ b/src/automount.c
@@ -154,7 +154,7 @@ static int automount_add_default_dependencies(Automount *a) {
if (a->meta.manager->running_as == MANAGER_SYSTEM) {
- if ((r = unit_add_two_dependencies_by_name(UNIT(a), UNIT_BEFORE, UNIT_CONFLICTED_BY, SPECIAL_UMOUNT_TARGET, NULL, true)) < 0)
+ if ((r = unit_add_two_dependencies_by_name(UNIT(a), UNIT_BEFORE, UNIT_CONFLICTS, SPECIAL_UMOUNT_TARGET, NULL, true)) < 0)
return r;
}
diff --git a/src/job.c b/src/job.c
index 0b6d321e99..8a74f8b614 100644
--- a/src/job.c
+++ b/src/job.c
@@ -500,16 +500,14 @@ int job_finish_and_invalidate(Job *j, bool success) {
t == JOB_RELOAD_OR_START) {
SET_FOREACH(other, u->meta.dependencies[UNIT_REQUIRED_BY], i)
- if (!other->meta.ignore_dependency_failure &&
- other->meta.job &&
+ if (other->meta.job &&
(other->meta.job->type == JOB_START ||
other->meta.job->type == JOB_VERIFY_ACTIVE ||
other->meta.job->type == JOB_RELOAD_OR_START))
job_finish_and_invalidate(other->meta.job, false);
SET_FOREACH(other, u->meta.dependencies[UNIT_REQUIRED_BY_OVERRIDABLE], i)
- if (!other->meta.ignore_dependency_failure &&
- other->meta.job &&
+ if (other->meta.job &&
!other->meta.job->override &&
(other->meta.job->type == JOB_START ||
other->meta.job->type == JOB_VERIFY_ACTIVE ||
@@ -519,16 +517,7 @@ int job_finish_and_invalidate(Job *j, bool success) {
} else if (t == JOB_STOP) {
SET_FOREACH(other, u->meta.dependencies[UNIT_CONFLICTS], i)
- if (!other->meta.ignore_dependency_failure &&
- other->meta.job &&
- (other->meta.job->type == JOB_START ||
- other->meta.job->type == JOB_VERIFY_ACTIVE ||
- other->meta.job->type == JOB_RELOAD_OR_START))
- job_finish_and_invalidate(other->meta.job, false);
-
- SET_FOREACH(other, u->meta.dependencies[UNIT_CONFLICTED_BY], i)
- if (!other->meta.ignore_dependency_failure &&
- other->meta.job &&
+ if (other->meta.job &&
(other->meta.job->type == JOB_START ||
other->meta.job->type == JOB_VERIFY_ACTIVE ||
other->meta.job->type == JOB_RELOAD_OR_START))
diff --git a/src/load-fragment.c b/src/load-fragment.c
index 828b8d2a98..4f94c6409e 100644
--- a/src/load-fragment.c
+++ b/src/load-fragment.c
@@ -1775,7 +1775,6 @@ static int load_from_path(Unit *u, const char *path) {
{ "RefuseManualStop", config_parse_bool, &u->meta.refuse_manual_stop, "Unit" },
{ "AllowIsolate", config_parse_bool, &u->meta.allow_isolate, "Unit" },
{ "DefaultDependencies", config_parse_bool, &u->meta.default_dependencies, "Unit" },
- { "IgnoreDependencyFailure",config_parse_bool, &u->meta.ignore_dependency_failure, "Unit" },
{ "JobTimeoutSec", config_parse_usec, &u->meta.job_timeout, "Unit" },
{ "ConditionPathExists", config_parse_condition_path, u, "Unit" },
{ "ConditionKernelCommandLine", config_parse_condition_kernel, u, "Unit" },
diff --git a/src/manager.c b/src/manager.c
index 796d3cbebe..9fa4877016 100644
--- a/src/manager.c
+++ b/src/manager.c
@@ -1483,7 +1483,7 @@ static int transaction_add_job_and_dependencies(
goto fail;
SET_FOREACH(dep, ret->unit->meta.dependencies[UNIT_CONFLICTED_BY], i)
- if ((r = transaction_add_job_and_dependencies(m, JOB_STOP, dep, ret, true, override, false, e, NULL)) < 0 && r != -EBADR)
+ if ((r = transaction_add_job_and_dependencies(m, JOB_STOP, dep, ret, false, override, false, e, NULL)) < 0 && r != -EBADR)
goto fail;
} else if (type == JOB_STOP || type == JOB_RESTART || type == JOB_TRY_RESTART) {
diff --git a/src/mount.c b/src/mount.c
index d62ce8f408..2f96625826 100644
--- a/src/mount.c
+++ b/src/mount.c
@@ -398,7 +398,7 @@ static int mount_add_default_dependencies(Mount *m) {
if ((r = unit_add_dependency_by_name(UNIT(m), UNIT_BEFORE, SPECIAL_QUOTACHECK_SERVICE, NULL, true)) < 0)
return r;
- if ((r = unit_add_two_dependencies_by_name(UNIT(m), UNIT_BEFORE, UNIT_CONFLICTED_BY, SPECIAL_UMOUNT_TARGET, NULL, true)) < 0)
+ if ((r = unit_add_two_dependencies_by_name(UNIT(m), UNIT_BEFORE, UNIT_CONFLICTS, SPECIAL_UMOUNT_TARGET, NULL, true)) < 0)
return r;
}
diff --git a/src/path.c b/src/path.c
index b3bc8a5a0d..1d6f98cfbd 100644
--- a/src/path.c
+++ b/src/path.c
@@ -110,7 +110,7 @@ static int path_add_default_dependencies(Path *p) {
if ((r = unit_add_two_dependencies_by_name(UNIT(p), UNIT_AFTER, UNIT_REQUIRES, SPECIAL_SYSINIT_TARGET, NULL, true)) < 0)
return r;
- return unit_add_two_dependencies_by_name(UNIT(p), UNIT_BEFORE, UNIT_CONFLICTED_BY, SPECIAL_SHUTDOWN_TARGET, NULL, true);
+ return unit_add_two_dependencies_by_name(UNIT(p), UNIT_BEFORE, UNIT_CONFLICTS, SPECIAL_SHUTDOWN_TARGET, NULL, true);
}
static int path_load(Unit *u) {
diff --git a/src/service.c b/src/service.c
index 49bdae7258..d3c750e544 100644
--- a/src/service.c
+++ b/src/service.c
@@ -1021,7 +1021,7 @@ static int service_add_default_dependencies(Service *s) {
}
/* Second, activate normal shutdown */
- return unit_add_two_dependencies_by_name(UNIT(s), UNIT_BEFORE, UNIT_CONFLICTED_BY, SPECIAL_SHUTDOWN_TARGET, NULL, true);
+ return unit_add_two_dependencies_by_name(UNIT(s), UNIT_BEFORE, UNIT_CONFLICTS, SPECIAL_SHUTDOWN_TARGET, NULL, true);
}
static int service_load(Unit *u) {
@@ -3017,7 +3017,7 @@ static int service_enumerate(Manager *m) {
if (service->meta.fragment_path)
continue;
- if ((r = unit_add_two_dependencies_by_name_inverse(service, UNIT_AFTER, UNIT_CONFLICTS, SPECIAL_SHUTDOWN_TARGET, NULL, true)) < 0)
+ if ((r = unit_add_two_dependencies_by_name(service, UNIT_BEFORE, UNIT_CONFLICTS, SPECIAL_SHUTDOWN_TARGET, NULL, true)) < 0)
goto finish;
}
diff --git a/src/socket.c b/src/socket.c
index e8c016cc70..6d2df95813 100644
--- a/src/socket.c
+++ b/src/socket.c
@@ -305,7 +305,7 @@ static int socket_add_default_dependencies(Socket *s) {
if ((r = unit_add_two_dependencies_by_name(UNIT(s), UNIT_AFTER, UNIT_REQUIRES, SPECIAL_SYSINIT_TARGET, NULL, true)) < 0)
return r;
- return unit_add_two_dependencies_by_name(UNIT(s), UNIT_BEFORE, UNIT_CONFLICTED_BY, SPECIAL_SHUTDOWN_TARGET, NULL, true);
+ return unit_add_two_dependencies_by_name(UNIT(s), UNIT_BEFORE, UNIT_CONFLICTS, SPECIAL_SHUTDOWN_TARGET, NULL, true);
}
static int socket_load(Unit *u) {
diff --git a/src/swap.c b/src/swap.c
index 078ad9fbbf..ddda9e1a31 100644
--- a/src/swap.c
+++ b/src/swap.c
@@ -211,7 +211,7 @@ static int swap_add_default_dependencies(Swap *s) {
if (s->meta.manager->running_as == MANAGER_SYSTEM) {
- if ((r = unit_add_two_dependencies_by_name(UNIT(s), UNIT_BEFORE, UNIT_CONFLICTED_BY, SPECIAL_UMOUNT_TARGET, NULL, true)) < 0)
+ if ((r = unit_add_two_dependencies_by_name(UNIT(s), UNIT_BEFORE, UNIT_CONFLICTS, SPECIAL_UMOUNT_TARGET, NULL, true)) < 0)
return r;
}
diff --git a/src/target.c b/src/target.c
index 3522bf1216..f322ce7275 100644
--- a/src/target.c
+++ b/src/target.c
@@ -77,7 +77,7 @@ static int target_add_default_dependencies(Target *t) {
return r;
/* Make sure targets are unloaded on shutdown */
- return unit_add_dependency_by_name(UNIT(t), UNIT_CONFLICTED_BY, SPECIAL_SHUTDOWN_TARGET, NULL, true);
+ return unit_add_dependency_by_name(UNIT(t), UNIT_CONFLICTS, SPECIAL_SHUTDOWN_TARGET, NULL, true);
}
static int target_add_getty_dependencies(Target *t) {
diff --git a/src/timer.c b/src/timer.c
index 627a360fe6..065e9c14db 100644
--- a/src/timer.c
+++ b/src/timer.c
@@ -82,7 +82,7 @@ static int timer_add_default_dependencies(Timer *t) {
if ((r = unit_add_two_dependencies_by_name(UNIT(t), UNIT_AFTER, UNIT_REQUIRES, SPECIAL_SYSINIT_TARGET, NULL, true)) < 0)
return r;
- return unit_add_two_dependencies_by_name(UNIT(t), UNIT_BEFORE, UNIT_CONFLICTED_BY, SPECIAL_SHUTDOWN_TARGET, NULL, true);
+ return unit_add_two_dependencies_by_name(UNIT(t), UNIT_BEFORE, UNIT_CONFLICTS, SPECIAL_SHUTDOWN_TARGET, NULL, true);
}
static int timer_load(Unit *u) {
diff --git a/src/unit.c b/src/unit.c
index fb5583bfb2..410ff9f607 100644
--- a/src/unit.c
+++ b/src/unit.c
@@ -655,13 +655,11 @@ void unit_dump(Unit *u, FILE *f, const char *prefix) {
"%s\tStopWhenUnneeded: %s\n"
"%s\tRefuseManualStart: %s\n"
"%s\tRefuseManualStop: %s\n"
- "%s\tDefaultDependencies: %s\n"
- "%s\tIgnoreDependencyFailure: %s\n",
+ "%s\tDefaultDependencies: %s\n",
prefix, yes_no(u->meta.stop_when_unneeded),
prefix, yes_no(u->meta.refuse_manual_start),
prefix, yes_no(u->meta.refuse_manual_stop),
- prefix, yes_no(u->meta.default_dependencies),
- prefix, yes_no(u->meta.ignore_dependency_failure));
+ prefix, yes_no(u->meta.default_dependencies));
LIST_FOREACH(by_unit, b, u->meta.cgroup_bondings)
fprintf(f, "%s\tControlGroup: %s:%s\n",
diff --git a/src/unit.h b/src/unit.h
index ff11511898..796aee5b5c 100644
--- a/src/unit.h
+++ b/src/unit.h
@@ -199,9 +199,6 @@ struct Meta {
/* Create default depedencies */
bool default_dependencies;
- /* Bring up this unit even if a dependency fails to start */
- bool ignore_dependency_failure;
-
/* Refuse manual starting, allow starting only indirectly via dependency. */
bool refuse_manual_start;
diff --git a/units/final.target b/units/final.target
index ba642615ad..9cfda197b0 100644
--- a/units/final.target
+++ b/units/final.target
@@ -11,5 +11,4 @@
Description=Final Step
DefaultDependencies=no
RefuseManualStart=yes
-IgnoreDependencyFailure=yes
After=shutdown.target umount.target
diff --git a/units/shutdown.target b/units/shutdown.target
index 4db9f1fbe5..99a659e92f 100644
--- a/units/shutdown.target
+++ b/units/shutdown.target
@@ -11,4 +11,3 @@
Description=Shutdown
DefaultDependencies=no
RefuseManualStart=yes
-IgnoreDependencyFailure=yes
diff --git a/units/umount.target b/units/umount.target
index b5a993f069..b9ecca6fb1 100644
--- a/units/umount.target
+++ b/units/umount.target
@@ -11,4 +11,3 @@
Description=Unmount All Filesystems
DefaultDependencies=no
RefuseManualStart=yes
-IgnoreDependencyFailure=yes