chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7f97f0f
)
target: implicitly shutdown targets on shutdown, so that they are pulled into the...
author
Lennart Poettering
<lennart@poettering.net>
Thu, 2 Sep 2010 23:42:19 +0000
(
01:42
+0200)
committer
Lennart Poettering
<lennart@poettering.net>
Thu, 2 Sep 2010 23:42:57 +0000
(
01:42
+0200)
src/target.c
patch
|
blob
|
history
units/halt.target
patch
|
blob
|
history
units/poweroff.target
patch
|
blob
|
history
units/reboot.target
patch
|
blob
|
history
units/shutdown.target
patch
|
blob
|
history
diff --git
a/src/target.c
b/src/target.c
index c350d8fa195bc2844a5b392758bb642e281c06ac..1118693a3907bc698b3915fdee35a635f24b9235 100644
(file)
--- a/
src/target.c
+++ b/
src/target.c
@@
-75,7
+75,8
@@
static int target_add_default_dependencies(Target *t) {
if ((r = unit_add_dependency(UNIT(t), UNIT_AFTER, other, true)) < 0)
return r;
if ((r = unit_add_dependency(UNIT(t), UNIT_AFTER, other, true)) < 0)
return r;
- return 0;
+ /* Make sure targets are unloaded on shutdown */
+ return unit_add_dependency_by_name(UNIT(t), UNIT_CONFLICTED_BY, SPECIAL_SHUTDOWN_TARGET, NULL, true);
}
static int target_add_getty_dependencies(Target *t) {
}
static int target_add_getty_dependencies(Target *t) {
diff --git
a/units/halt.target
b/units/halt.target
index 70e90fedde60aa36de3e6de899d9cf3f87851191..04b42cd3d1d56a341fd9d5114e315d273b4b21ee 100644
(file)
--- a/
units/halt.target
+++ b/
units/halt.target
@@
-9,6
+9,7
@@
[Unit]
Description=Halt
[Unit]
Description=Halt
+DefaultDependencies=no
Requires=halt.service
After=halt.service
AllowIsolate=yes
Requires=halt.service
After=halt.service
AllowIsolate=yes
diff --git
a/units/poweroff.target
b/units/poweroff.target
index cb9460639f372e0bdc4c40253b83f2502749b2e5..975b088965d0e01b6b35159c8771a574868ec884 100644
(file)
--- a/
units/poweroff.target
+++ b/
units/poweroff.target
@@
-9,6
+9,7
@@
[Unit]
Description=Power-Off
[Unit]
Description=Power-Off
+DefaultDependencies=no
Names=runlevel0.target
Requires=poweroff.service
After=poweroff.service
Names=runlevel0.target
Requires=poweroff.service
After=poweroff.service
diff --git
a/units/reboot.target
b/units/reboot.target
index 855751306d924189e8265d3bcdc06abf7332a2a9..2cd46a062bf2d9c04349ad2f52e301ad2b4f03dc 100644
(file)
--- a/
units/reboot.target
+++ b/
units/reboot.target
@@
-9,6
+9,7
@@
[Unit]
Description=Reboot
[Unit]
Description=Reboot
+DefaultDependencies=no
Names=runlevel6.target
Requires=reboot.service
After=reboot.service
Names=runlevel6.target
Requires=reboot.service
After=reboot.service
diff --git
a/units/shutdown.target
b/units/shutdown.target
index 6d1fb6f10ff85490b5693f92a2bf0de901478e75..4db9f1fbe56e195ee458f5d1ff9814160df21a00 100644
(file)
--- a/
units/shutdown.target
+++ b/
units/shutdown.target
@@
-9,5
+9,6
@@
[Unit]
Description=Shutdown
[Unit]
Description=Shutdown
+DefaultDependencies=no
RefuseManualStart=yes
IgnoreDependencyFailure=yes
RefuseManualStart=yes
IgnoreDependencyFailure=yes