systemd/0001-systemctl-allow-to-change-the-default-target-without.patch
Stephan Kulow 6a62c05e32 Accepting request 249581 from Base:System
- Add upstream patches as real fixes
  0001-activate-fix-fd-leak-in-do_accept.patch
  0002-analyze-avoid-a-null-dereference.patch
  0003-analyze-fix-mem-leak.patch
  0004-backlight-Avoid-error-when-state-restore-is-disabled.patch
  0005-bus-avoid-using-m-kdbus-after-freeing-it.patch
  0006-bus-unref-buscreds-on-failure.patch
  0007-core-fix-a-potential-mem-leak.patch
  0008-core-smack-setup-Actually-allow-for-succesfully-load.patch
  0009-journal-do-not-leak-mmaps-on-OOM.patch
  0010-manager-use-correct-cleanup-function.patch
- Intergrate the work of Robert and rename the patch
  1068-udev-remove-userspace-firmware-loading-support.patch
  to 1078-udev-remove-userspace-firmware-loading-support.patch
  Also add patch
  1079-udev-remove-userspace-firmware-loading-support.patch
  to apply the same change for opensuse 13.2 and above

- Add upstream patch
  0001-systemctl-allow-to-change-the-default-target-without.patch
  to allow to override default target without --force (bnc#896664)

- Add upstream patches for udev 
  1068-udev-net_setup_link-export-the-.link-filename-applie.patch
  1069-rules-net-setup-link-preserve-ID_NET_LINK_FILE-and-I.patch
  1070-rules-net-setup-link-remove-stray-linebreak.patch
  1071-udev-import-the-full-db-on-MOVE-events-for-devices-w.patch
  1072-udev-netif_rename-don-t-log-to-kmsg.patch
  1073-udev-drop-print_kmsg.patch
  1074-udev-fix-copy-paste-error-in-log-message.patch

OBS-URL: https://build.opensuse.org/request/show/249581
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=206
2014-09-17 15:41:54 +00:00

52 lines
2.1 KiB
Diff

From a1484a216e79da1fa7e2323095fb1b7203fb7a17 Mon Sep 17 00:00:00 2001
From: Djalal Harouni <tixxdz@opendz.org>
Date: Mon, 14 Apr 2014 01:07:52 +0100
Subject: [PATCH] systemctl: allow to change the default target without the
--force switch
Currently "systemctl set-default" will fail to change the default target
due to the 'default.target' being a symlink which is always the case.
To work around this, the user must specify the "--force" switch to be
able to overwrite the existing symlink.
This is clearly a regression that was introduced by commit 718db96199e
since it worked before without the "--force" switch and the man pages do
not mention that you need to specify it. It is expected that this is a
symlink.
So just explicity set the force flag to make it work again.
https://bugs.freedesktop.org/show_bug.cgi?id=76623
Reported-by: <code@progandy.de>
---
src/systemctl/systemctl.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git src/systemctl/systemctl.c src/systemctl/systemctl.c
index ee0938f..1b381f7 100644
--- src/systemctl/systemctl.c
+++ src/systemctl/systemctl.c
@@ -1968,7 +1968,7 @@ static int set_default(sd_bus *bus, char **args) {
return log_oom();
if (!bus || avoid_bus()) {
- r = unit_file_set_default(arg_scope, arg_root, unit, arg_force, &changes, &n_changes);
+ r = unit_file_set_default(arg_scope, arg_root, unit, true, &changes, &n_changes);
if (r < 0) {
log_error("Failed to set default target: %s", strerror(-r));
return r;
@@ -1990,7 +1990,7 @@ static int set_default(sd_bus *bus, char **args) {
"SetDefaultTarget",
&error,
&reply,
- "sb", unit, arg_force);
+ "sb", unit, true);
if (r < 0) {
log_error("Failed to set default target: %s", bus_error_message(&error, -r));
return r;
--
1.7.9.2