[systemd-commits] 2 commits - Makefile.am src/systemctl.c units/final.target units/halt.service.in units/kexec.service.in units/poweroff.service.in units/reboot.service.in
Lennart Poettering
lennart at kemper.freedesktop.org
Wed Oct 13 18:19:20 PDT 2010
Makefile.am | 1 +
src/systemctl.c | 9 ++++-----
units/final.target | 15 +++++++++++++++
units/halt.service.in | 4 ++--
units/kexec.service.in | 4 ++--
units/poweroff.service.in | 4 ++--
units/reboot.service.in | 4 ++--
7 files changed, 28 insertions(+), 13 deletions(-)
New commits:
commit b4f27ccc6339dff34f0293b91b2047027a211809
Author: Lennart Poettering <lennart at poettering.net>
Date: Thu Oct 14 03:19:13 2010 +0200
systemctl: accept -f as short for --force
diff --git a/src/systemctl.c b/src/systemctl.c
index ffb4f73..555c171 100644
--- a/src/systemctl.c
+++ b/src/systemctl.c
@@ -3939,7 +3939,7 @@ static int systemctl_help(void) {
" --global Enable/disable unit files globally\n"
" --no-reload When enabling/disabling unit files, don't reload daemon\n"
" configuration\n"
- " --force When enabling unit files, override existing symlinks\n"
+ " -f --force When enabling unit files, override existing symlinks\n"
" When shutting down, execute action immediately\n"
" --defaults When disabling unit files, remove default symlinks only\n\n"
"Commands:\n"
@@ -4068,7 +4068,6 @@ static int systemctl_parse_argv(int argc, char *argv[]) {
ARG_ORDER,
ARG_REQUIRE,
ARG_FULL,
- ARG_FORCE,
ARG_NO_RELOAD,
ARG_DEFAULTS
};
@@ -4089,7 +4088,7 @@ static int systemctl_parse_argv(int argc, char *argv[]) {
{ "quiet", no_argument, NULL, 'q' },
{ "order", no_argument, NULL, ARG_ORDER },
{ "require", no_argument, NULL, ARG_REQUIRE },
- { "force", no_argument, NULL, ARG_FORCE },
+ { "force", no_argument, NULL, 'f' },
{ "no-reload", no_argument, NULL, ARG_NO_RELOAD },
{ "defaults", no_argument, NULL, ARG_DEFAULTS },
{ NULL, 0, NULL, 0 }
@@ -4100,7 +4099,7 @@ static int systemctl_parse_argv(int argc, char *argv[]) {
assert(argc >= 0);
assert(argv);
- while ((c = getopt_long(argc, argv, "ht:p:aq", options, NULL)) >= 0) {
+ while ((c = getopt_long(argc, argv, "ht:p:aqf", options, NULL)) >= 0) {
switch (c) {
@@ -4174,7 +4173,7 @@ static int systemctl_parse_argv(int argc, char *argv[]) {
arg_quiet = true;
break;
- case ARG_FORCE:
+ case 'f':
arg_force = true;
break;
commit 9aac953a11452e825bad68750f811fe8722324b4
Author: Lennart Poettering <lennart at poettering.net>
Date: Thu Oct 14 03:07:36 2010 +0200
units: introduce final.target that can be used to plug units between shutdown.target and the final shutdown
diff --git a/Makefile.am b/Makefile.am
index 8b2248f..b3f2abc 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -174,6 +174,7 @@ dist_systemunit_DATA = \
units/rpcbind.target \
units/rtc-set.target \
units/shutdown.target \
+ units/final.target \
units/umount.target \
units/sigpwr.target \
units/sockets.target \
diff --git a/units/final.target b/units/final.target
new file mode 100644
index 0000000..ba64261
--- /dev/null
+++ b/units/final.target
@@ -0,0 +1,15 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# See systemd.special(7) for details
+
+[Unit]
+Description=Final Step
+DefaultDependencies=no
+RefuseManualStart=yes
+IgnoreDependencyFailure=yes
+After=shutdown.target umount.target
diff --git a/units/halt.service.in b/units/halt.service.in
index 730c4c2..42e3470 100644
--- a/units/halt.service.in
+++ b/units/halt.service.in
@@ -8,8 +8,8 @@
[Unit]
Description=Halt
DefaultDependencies=no
-Requires=shutdown.target umount.target
-After=shutdown.target umount.target
+Requires=shutdown.target umount.target final.target
+After=shutdown.target umount.target final.target
[Service]
Type=oneshot
diff --git a/units/kexec.service.in b/units/kexec.service.in
index 70ad227..cf6bd65 100644
--- a/units/kexec.service.in
+++ b/units/kexec.service.in
@@ -8,8 +8,8 @@
[Unit]
Description=Reboot via kexec
DefaultDependencies=no
-Requires=shutdown.target umount.target
-After=shutdown.target umount.target
+Requires=shutdown.target umount.target final.target
+After=shutdown.target umount.target final.target
[Service]
Type=oneshot
diff --git a/units/poweroff.service.in b/units/poweroff.service.in
index da66f8e..124a4c0 100644
--- a/units/poweroff.service.in
+++ b/units/poweroff.service.in
@@ -8,8 +8,8 @@
[Unit]
Description=Power-Off
DefaultDependencies=no
-Requires=shutdown.target umount.target
-After=shutdown.target umount.target
+Requires=shutdown.target umount.target final.target
+After=shutdown.target umount.target final.target
[Service]
Type=oneshot
diff --git a/units/reboot.service.in b/units/reboot.service.in
index e5e666f..f320fd8 100644
--- a/units/reboot.service.in
+++ b/units/reboot.service.in
@@ -8,8 +8,8 @@
[Unit]
Description=Reboot
DefaultDependencies=no
-Requires=shutdown.target umount.target
-After=shutdown.target umount.target
+Requires=shutdown.target umount.target final.target
+After=shutdown.target umount.target final.target
[Service]
Type=oneshot
More information about the systemd-commits
mailing list