Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
steam
systemd
Commits
4e8c40a4
Commit
4e8c40a4
authored
Dec 21, 2016
by
Michael Biebl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
systemctl: Fix argument handling when invoked as shutdown
Closes: #776997
parent
0092dd05
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
59 additions
and
0 deletions
+59
-0
debian/patches/series
debian/patches/series
+2
-0
debian/patches/systemctl-fix-argument-handling-when-invoked-as-shutdown.patch
...mctl-fix-argument-handling-when-invoked-as-shutdown.patch
+31
-0
debian/patches/systemctl-when-reading-legacy-t-argument-for-shutdown-don.patch
...ctl-when-reading-legacy-t-argument-for-shutdown-don.patch
+26
-0
No files found.
debian/patches/series
View file @
4e8c40a4
...
...
@@ -168,6 +168,8 @@ units-order-systemd-user-sessions.service-after-network.t.patch
pid1-don-t-return-any-error-in-manager_dispatch_noti.patch
polkit-don-t-start-polkit-agent-when-running-as-root.patch
core-rework-logic-to-determine-when-we-decide-to-add-auto.patch
systemctl-fix-argument-handling-when-invoked-as-shutdown.patch
systemctl-when-reading-legacy-t-argument-for-shutdown-don.patch
## Debian specific patches:
Add-back-support-for-Debian-specific-config-files.patch
...
...
debian/patches/systemctl-fix-argument-handling-when-invoked-as-shutdown.patch
0 → 100644
View file @
4e8c40a4
From: Jan Synacek <jsynacek@redhat.com>
Date: Mon, 15 Dec 2014 10:39:00 +0100
Subject: systemctl: fix argument handling when invoked as "shutdown"
(cherry picked from commit 75836b9d2071aab978ee78d7d797126a18a32052)
---
src/systemctl/systemctl.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index 942acbc..f4fbab5 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -6219,7 +6219,7 @@
static int shutdown_parse_argv(int argc, char *argv[]) {
assert(argc >= 0);
assert(argv);
- while ((c = getopt_long(argc, argv, "HPrhkt:afFc", options, NULL)) >= 0) {
+ while ((c = getopt_long(argc, argv, "HPrhkKt:afFc", options, NULL)) >= 0) {
switch (c) {
case ARG_HELP:
@@ -6259,6 +6259,8 @@
static int shutdown_parse_argv(int argc, char *argv[]) {
case 't':
case 'a':
+ case 'f':
+ case 'F':
/* Compatibility nops */
break;
debian/patches/systemctl-when-reading-legacy-t-argument-for-shutdown-don.patch
0 → 100644
View file @
4e8c40a4
From: Lennart Poettering <lennart@poettering.net>
Date: Tue, 29 Sep 2015 22:40:05 +0200
Subject: systemctl: when reading legacy -t argument for shutdown,
don't drop following parameter
We currently completely ignore the following parameter, but we really
should not, as that is actually the time to shut down on.
(cherry picked from commit a4420f7b8ed73b05ef6f31622101e7804daef69f)
---
src/systemctl/systemctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index f4fbab5..9adef05 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -6219,7 +6219,7 @@
static int shutdown_parse_argv(int argc, char *argv[]) {
assert(argc >= 0);
assert(argv);
- while ((c = getopt_long(argc, argv, "HPrhkKt:afFc", options, NULL)) >= 0) {
+ while ((c = getopt_long(argc, argv, "HPrhkKtafFc", options, NULL)) >= 0) {
switch (c) {
case ARG_HELP:
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment