Source: init-system-helpers
Source-Version: 1.51
Severity: normal
Tags: patch

Hi!

The current list of paths honored by deb-systemd-helper does not match
the one in systemd [L]. That's fine for several of them because they
are intended to be for run-time generated content, or local admin
content. There is still at least one that can be used by packages
depending on the distribution policy that is missing, i.e.
“/usr/local/lib/systemd/system”.

 [L] 
<https://github.com/systemd/systemd/blob/master/src/shared/path-lookup.c#L575>

Thanks,
Guillem
From 99fb1880ce55a79a135a4dc60aa94fd88d7b362b Mon Sep 17 00:00:00 2001
From: Guillem Jover <gjo...@sipwise.com>
Date: Tue, 16 Jan 2018 19:07:44 +0100
Subject: [PATCH] Honor the same package-relevant unit paths as systemd
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The current list of paths honored by deb-systemd-helper does not match
the one in systemd. That's fine for several of them because they are
intended to be for run-time generated content, or local administrator
content. There is still at least one that can be used by packages
depending on the distribution policy that is missing, i.e.
“/usr/local/lib/systemd/system”.

Signed-off-by: Guillem Jover <gjo...@sipwise.com>
---
 script/deb-systemd-helper | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/script/deb-systemd-helper b/script/deb-systemd-helper
index 3d40d8d..5e630d5 100755
--- a/script/deb-systemd-helper
+++ b/script/deb-systemd-helper
@@ -122,6 +122,8 @@ sub find_unit {
         $service_path = "/etc/systemd/system/$scriptname";
     } elsif (-f "/lib/systemd/system/$scriptname") {
         $service_path = "/lib/systemd/system/$scriptname";
+    } elsif (-f "/usr/lib/systemd/system/$scriptname") {
+        $service_path = "/usr/lib/systemd/system/$scriptname";
     }
     return $service_path;
 }
-- 
2.15.1

_______________________________________________
Pkg-systemd-maintainers mailing list
Pkg-systemd-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-systemd-maintainers

Reply via email to