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:
51bc5d4
)
units: turn Wants=shutdown back into Requires=shutdown to avoid removal of jobs due...
author
Lennart Poettering
<lennart@poettering.net>
Sun, 11 Jul 2010 02:22:00 +0000
(
04:22
+0200)
committer
Lennart Poettering
<lennart@poettering.net>
Sun, 11 Jul 2010 02:22:00 +0000
(
04:22
+0200)
15 files changed:
src/systemctl.c
patch
|
blob
|
history
units/arch/halt.service
patch
|
blob
|
history
units/arch/poweroff.service
patch
|
blob
|
history
units/arch/reboot.service
patch
|
blob
|
history
units/emergency.service
patch
|
blob
|
history
units/fedora/halt.service
patch
|
blob
|
history
units/fedora/poweroff.service
patch
|
blob
|
history
units/fedora/reboot.service
patch
|
blob
|
history
units/gentoo/halt.service
patch
|
blob
|
history
units/gentoo/poweroff.service
patch
|
blob
|
history
units/gentoo/reboot.service
patch
|
blob
|
history
units/session/exit.service.in
patch
|
blob
|
history
units/suse/halt.service
patch
|
blob
|
history
units/suse/poweroff.service
patch
|
blob
|
history
units/suse/reboot.service
patch
|
blob
|
history
diff --git
a/src/systemctl.c
b/src/systemctl.c
index d033a75280e27c44da466e9efa94903de510f0e0..d1892e4ae05bfdd27ebe0716faf20a16c094416c 100644
(file)
--- a/
src/systemctl.c
+++ b/
src/systemctl.c
@@
-794,12
+794,17
@@
finish:
}
static int start_special(DBusConnection *bus, char **args, unsigned n) {
}
static int start_special(DBusConnection *bus, char **args, unsigned n) {
+ int r;
+
assert(bus);
assert(args);
assert(bus);
assert(args);
- warn_wall(verb_to_action(args[0]));
+ r = start_unit(bus, args, n);
+
+ if (r >= 0)
+ warn_wall(verb_to_action(args[0]));
- return
start_unit(bus, args, n)
;
+ return
r
;
}
static int check_unit(DBusConnection *bus, char **args, unsigned n) {
}
static int check_unit(DBusConnection *bus, char **args, unsigned n) {
@@
-3292,26
+3297,29
@@
static int reload_with_fallback(DBusConnection *bus) {
static int start_with_fallback(DBusConnection *bus) {
int r;
static int start_with_fallback(DBusConnection *bus) {
int r;
- warn_wall(arg_action);
if (bus) {
/* First, try systemd via D-Bus. */
if ((r = start_unit(bus, NULL, 0)) > 0)
if (bus) {
/* First, try systemd via D-Bus. */
if ((r = start_unit(bus, NULL, 0)) > 0)
-
return 0
;
+
goto done
;
/* Hmm, talking to systemd via D-Bus didn't work. Then
* let's try to talk to Upstart via D-Bus. */
if ((r = talk_upstart()) > 0)
/* Hmm, talking to systemd via D-Bus didn't work. Then
* let's try to talk to Upstart via D-Bus. */
if ((r = talk_upstart()) > 0)
-
return 0
;
+
goto done
;
}
/* Nothing else worked, so let's try
* /dev/initctl */
if ((r = talk_initctl()) != 0)
}
/* Nothing else worked, so let's try
* /dev/initctl */
if ((r = talk_initctl()) != 0)
-
return 0
;
+
goto done
;
log_error("Failed to talk to init daemon.");
return -EIO;
log_error("Failed to talk to init daemon.");
return -EIO;
+
+done:
+ warn_wall(arg_action);
+ return 0;
}
static int halt_main(DBusConnection *bus) {
}
static int halt_main(DBusConnection *bus) {
diff --git
a/units/arch/halt.service
b/units/arch/halt.service
index 190e4fee894b7aba630df3fd3b37f7117256f7f8..87224e34b6142ab4a0c8627afadbac7a9e4aa215 100644
(file)
--- a/
units/arch/halt.service
+++ b/
units/arch/halt.service
@@
-8,7
+8,7
@@
[Unit]
Description=Halt
DefaultDependencies=no
[Unit]
Description=Halt
DefaultDependencies=no
-
Want
s=shutdown.target
+
Require
s=shutdown.target
After=shutdown.target
Conflicts=dev-hugepages.automount dev-mqueue.automount proc-sys-fs-binfmt_misc.automount sys-kernel-debug.automount sys-kernel-security.automount
After=shutdown.target
Conflicts=dev-hugepages.automount dev-mqueue.automount proc-sys-fs-binfmt_misc.automount sys-kernel-debug.automount sys-kernel-security.automount
diff --git
a/units/arch/poweroff.service
b/units/arch/poweroff.service
index 0b1ee89aa679a65f7cbea3f5ae02e713f43a7ef5..ffa592c8f67c7196a5f472fe09d13a9069b97b29 100644
(file)
--- a/
units/arch/poweroff.service
+++ b/
units/arch/poweroff.service
@@
-8,7
+8,7
@@
[Unit]
Description=Power-Off
DefaultDependencies=no
[Unit]
Description=Power-Off
DefaultDependencies=no
-
Want
s=shutdown.target
+
Require
s=shutdown.target
After=shutdown.target
Conflicts=dev-hugepages.automount dev-mqueue.automount proc-sys-fs-binfmt_misc.automount sys-kernel-debug.automount sys-kernel-security.automount
After=shutdown.target
Conflicts=dev-hugepages.automount dev-mqueue.automount proc-sys-fs-binfmt_misc.automount sys-kernel-debug.automount sys-kernel-security.automount
diff --git
a/units/arch/reboot.service
b/units/arch/reboot.service
index 274f4075f2db61d297ce51c23a269e31c890c4bf..934903dc6b5b3c4df44efe28f30e6c5311fc2766 100644
(file)
--- a/
units/arch/reboot.service
+++ b/
units/arch/reboot.service
@@
-8,7
+8,7
@@
[Unit]
Description=Reboot
DefaultDependencies=no
[Unit]
Description=Reboot
DefaultDependencies=no
-
Want
s=shutdown.target
+
Require
s=shutdown.target
After=shutdown.target
Conflicts=dev-hugepages.automount dev-mqueue.automount proc-sys-fs-binfmt_misc.automount sys-kernel-debug.automount sys-kernel-security.automount
After=shutdown.target
Conflicts=dev-hugepages.automount dev-mqueue.automount proc-sys-fs-binfmt_misc.automount sys-kernel-debug.automount sys-kernel-security.automount
diff --git
a/units/emergency.service
b/units/emergency.service
index 0014c263b400e37a4f4a5edd31baa80ca05c6abf..bcedebfa089d711f8df3201b3637381c847cfa7a 100644
(file)
--- a/
units/emergency.service
+++ b/
units/emergency.service
@@
-10,7
+10,7
@@
[Unit]
Description=Emergency Shell
DefaultDependencies=no
[Unit]
Description=Emergency Shell
DefaultDependencies=no
-
Want
s=shutdown.target umount.target
+
Require
s=shutdown.target umount.target
After=shutdown.target umount.target
[Service]
After=shutdown.target umount.target
[Service]
diff --git
a/units/fedora/halt.service
b/units/fedora/halt.service
index 0c0fa5fa380ac7816ccc8a0d681e08ca7d7aa338..b957a3fe302f4ee4e6dfcab5a25b229a8f236354 100644
(file)
--- a/
units/fedora/halt.service
+++ b/
units/fedora/halt.service
@@
-8,7
+8,7
@@
[Unit]
Description=Halt
DefaultDependencies=no
[Unit]
Description=Halt
DefaultDependencies=no
-
Want
s=shutdown.target killall.service
+
Require
s=shutdown.target killall.service
After=shutdown.target killall.service
Conflicts=dev-hugepages.automount dev-mqueue.automount proc-sys-fs-binfmt_misc.automount sys-kernel-debug.automount sys-kernel-security.automount
After=shutdown.target killall.service
Conflicts=dev-hugepages.automount dev-mqueue.automount proc-sys-fs-binfmt_misc.automount sys-kernel-debug.automount sys-kernel-security.automount
diff --git
a/units/fedora/poweroff.service
b/units/fedora/poweroff.service
index 913edc489fefce6b413a571db7b2c130800522cb..76d030c041c2cf15e51ab6ce184d87629aac183f 100644
(file)
--- a/
units/fedora/poweroff.service
+++ b/
units/fedora/poweroff.service
@@
-8,7
+8,7
@@
[Unit]
Description=Power-Off
DefaultDependencies=no
[Unit]
Description=Power-Off
DefaultDependencies=no
-
Want
s=shutdown.target killall.service
+
Require
s=shutdown.target killall.service
After=shutdown.target killall.service
Conflicts=dev-hugepages.automount dev-mqueue.automount proc-sys-fs-binfmt_misc.automount sys-kernel-debug.automount sys-kernel-security.automount
After=shutdown.target killall.service
Conflicts=dev-hugepages.automount dev-mqueue.automount proc-sys-fs-binfmt_misc.automount sys-kernel-debug.automount sys-kernel-security.automount
diff --git
a/units/fedora/reboot.service
b/units/fedora/reboot.service
index c81b13ecd9f38ebb2772c848a41b9fcd6b2b23ff..6a93c0b5575c29d6d02b7d04ffe50ba4219fde8d 100644
(file)
--- a/
units/fedora/reboot.service
+++ b/
units/fedora/reboot.service
@@
-8,7
+8,7
@@
[Unit]
Description=Reboot
DefaultDependencies=no
[Unit]
Description=Reboot
DefaultDependencies=no
-
Want
s=shutdown.target killall.service
+
Require
s=shutdown.target killall.service
After=shutdown.target killall.service
Conflicts=dev-hugepages.automount dev-mqueue.automount proc-sys-fs-binfmt_misc.automount sys-kernel-debug.automount sys-kernel-security.automount
After=shutdown.target killall.service
Conflicts=dev-hugepages.automount dev-mqueue.automount proc-sys-fs-binfmt_misc.automount sys-kernel-debug.automount sys-kernel-security.automount
diff --git
a/units/gentoo/halt.service
b/units/gentoo/halt.service
index 28db813fb37772f6d1f04fe530d4fab77ce2f2d6..19ead8a315a3dac732b3639a3edbcbe84111b7af 100644
(file)
--- a/
units/gentoo/halt.service
+++ b/
units/gentoo/halt.service
@@
-8,7
+8,7
@@
[Unit]
Description=Halt
DefaultDependencies=no
[Unit]
Description=Halt
DefaultDependencies=no
-
Want
s=shutdown.target killall.service
+
Require
s=shutdown.target killall.service
After=shutdown.target killall.service
Conflicts=dev-hugepages.automount dev-mqueue.automount proc-sys-fs-binfmt_misc.automount sys-kernel-debug.automount sys-kernel-security.automount
After=shutdown.target killall.service
Conflicts=dev-hugepages.automount dev-mqueue.automount proc-sys-fs-binfmt_misc.automount sys-kernel-debug.automount sys-kernel-security.automount
diff --git
a/units/gentoo/poweroff.service
b/units/gentoo/poweroff.service
index da6f48f74913c7f8b59dc74b97ae4c2a5b81a825..9ceb205b05195c08a227b7199f920887f050c5de 100644
(file)
--- a/
units/gentoo/poweroff.service
+++ b/
units/gentoo/poweroff.service
@@
-8,7
+8,7
@@
[Unit]
Description=Power-Off
DefaultDependencies=no
[Unit]
Description=Power-Off
DefaultDependencies=no
-
Want
s=shutdown.target killall.service
+
Require
s=shutdown.target killall.service
After=shutdown.target killall.service
Conflicts=dev-hugepages.automount dev-mqueue.automount proc-sys-fs-binfmt_misc.automount sys-kernel-debug.automount sys-kernel-security.automount
After=shutdown.target killall.service
Conflicts=dev-hugepages.automount dev-mqueue.automount proc-sys-fs-binfmt_misc.automount sys-kernel-debug.automount sys-kernel-security.automount
diff --git
a/units/gentoo/reboot.service
b/units/gentoo/reboot.service
index a0f357538552f5abbfcc81f1bb11557ed0a59a0e..c223e6c26f4390171cffdfce0c6539599d6ba2f8 100644
(file)
--- a/
units/gentoo/reboot.service
+++ b/
units/gentoo/reboot.service
@@
-8,7
+8,7
@@
[Unit]
Description=Reboot
DefaultDependencies=no
[Unit]
Description=Reboot
DefaultDependencies=no
-
Want
s=shutdown.target killall.service
+
Require
s=shutdown.target killall.service
After=shutdown.target killall.service
Conflicts=dev-hugepages.automount dev-mqueue.automount proc-sys-fs-binfmt_misc.automount sys-kernel-debug.automount sys-kernel-security.automount
After=shutdown.target killall.service
Conflicts=dev-hugepages.automount dev-mqueue.automount proc-sys-fs-binfmt_misc.automount sys-kernel-debug.automount sys-kernel-security.automount
diff --git
a/units/session/exit.service.in
b/units/session/exit.service.in
index 3e5b5bff71efa25332fc289aedd2dfd01ba820ca..1f515a75cedbf15701b9a61737cc3be85d0bfcb0 100644
(file)
--- a/
units/session/exit.service.in
+++ b/
units/session/exit.service.in
@@
-1,7
+1,7
@@
[Unit]
Description=Exit
DefaultDependencies=no
[Unit]
Description=Exit
DefaultDependencies=no
-
Want
s=shutdown.target
+
Require
s=shutdown.target
After=shutdown.target
[Service]
After=shutdown.target
[Service]
diff --git
a/units/suse/halt.service
b/units/suse/halt.service
index 00bbfa93f49f81320c1b07995af8588367645e71..5f42ac691f72557c78ccbf22b9648a7b84188c65 100644
(file)
--- a/
units/suse/halt.service
+++ b/
units/suse/halt.service
@@
-8,7
+8,7
@@
[Unit]
Description=Halt
DefaultDependencies=no
[Unit]
Description=Halt
DefaultDependencies=no
-
Want
s=shutdown.target
+
Require
s=shutdown.target
After=shutdown.target
Conflicts=dev-hugepages.automount dev-mqueue.automount proc-sys-fs-binfmt_misc.automount sys-kernel-debug.automount sys-kernel-security.automount
After=shutdown.target
Conflicts=dev-hugepages.automount dev-mqueue.automount proc-sys-fs-binfmt_misc.automount sys-kernel-debug.automount sys-kernel-security.automount
diff --git
a/units/suse/poweroff.service
b/units/suse/poweroff.service
index e9aff275d4458cc5296025853fb60ff46fbf5397..93a9da502ad839bd2d3c8b563e9ebcbd4c18aa36 100644
(file)
--- a/
units/suse/poweroff.service
+++ b/
units/suse/poweroff.service
@@
-8,7
+8,7
@@
[Unit]
Description=Power-Off
DefaultDependencies=no
[Unit]
Description=Power-Off
DefaultDependencies=no
-
Want
s=shutdown.target
+
Require
s=shutdown.target
After=shutdown.target
Conflicts=dev-hugepages.automount dev-mqueue.automount proc-sys-fs-binfmt_misc.automount sys-kernel-debug.automount sys-kernel-security.automount
After=shutdown.target
Conflicts=dev-hugepages.automount dev-mqueue.automount proc-sys-fs-binfmt_misc.automount sys-kernel-debug.automount sys-kernel-security.automount
diff --git
a/units/suse/reboot.service
b/units/suse/reboot.service
index e9b76b61db3bfac30dab9fbd6bddb1e1a2587493..c3526b3035c3070f730e9ca531f6c76b94ae6737 100644
(file)
--- a/
units/suse/reboot.service
+++ b/
units/suse/reboot.service
@@
-8,7
+8,7
@@
[Unit]
Description=Reboot
DefaultDependencies=no
[Unit]
Description=Reboot
DefaultDependencies=no
-
Want
s=shutdown.target
+
Require
s=shutdown.target
After=shutdown.target
Conflicts=dev-hugepages.automount dev-mqueue.automount proc-sys-fs-binfmt_misc.automount sys-kernel-debug.automount sys-kernel-security.automount
After=shutdown.target
Conflicts=dev-hugepages.automount dev-mqueue.automount proc-sys-fs-binfmt_misc.automount sys-kernel-debug.automount sys-kernel-security.automount