SHA256
1
0
forked from pool/systemd
systemd/is-enabled-non-existing-service.patch
Frederic Crozat 813b4bf38e - Update to version 41:
+ systemd binary is now installed in /lib/systemd (symlink for
  /bin/systemd is available now)
  + kernel modules are now loaded through libkmod
  + Watchdog support is now useful (not complete)
  + new kernel command line available to set system wide
    environment variable: systemd.setenv
  + journald capabilities set is now limited
  + SIGPIPE is ignored by default. This can be disabled with
    IgnoreSIGPIPE=no in unit files.
- Add fix-kmod-build.patch: fix build with libkmod
- Drop remote-fs-after-network.patch (merged upstream)
- Add dm-lvm-after-local-fs-pre-target.patch: ensure md / lvm
  /dmraid is started before mounting partitions, if fsck was
  disabled for them (bnc#733283).
- Update lsb-header patch to correctly disable heuristic if
  X-Systemd-RemainAfterExit is specified (whatever its value)
- Add fix-message-after-chkconfig.patch: don't complain if only
  sysv services are called in systemctl.
- Add is-enabled-non-existing-service.patch: fix error message when
  running is-enabled on non-existing service.

OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=242
2012-02-09 17:04:56 +00:00

35 lines
990 B
Diff

From 81006b8ad8cfdbfdb418fc99918ee5c33eb5b35a Mon Sep 17 00:00:00 2001
From: Michal Schmidt <mschmidt@redhat.com>
Date: Thu, 9 Feb 2012 10:36:56 +0100
Subject: [PATCH] install: fix incorrect 'Access denied' message with a
non-existent unit
With "systemctl is-enabled non-existent.service"
_UNIT_FILE_STATE_INVALID (-1) was wrongly interpreted as -errno.
Return -ENOENT in this case.
https://bugzilla.redhat.com/show_bug.cgi?id=766579
---
src/install.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/install.c b/src/install.c
index 1fb1f9d..174d79b 100644
--- a/src/install.c
+++ b/src/install.c
@@ -1571,10 +1571,10 @@ UnitFileState unit_file_get_state(
}
if (lstat(path, &st) < 0) {
+ r = -errno;
if (errno == ENOENT)
continue;
- r = -errno;
goto finish;
}
--
1.7.7