Control: tags -1 patch

On Thu, 20 Nov 2014 17:06:35 +0100 Markus Koschany <[email protected]> wrote:
> Package: dh-systemd
> Version: 1.22
> Severity: wishlist
> 
> 
> Hi,
> 
> it would be nice if dh-systemd was able to install service files with
> the @ sign automatically. Those kind of files install template units but have
> to be explicitly installed into /lib/systemd/system.
> 
> When building --with systemd this file is detected and installed
> automatically
> 
> minetest-server.service
> 
> With this one nothing happens
> 
> [email protected]
> 
> Regards,
> 
> Markus

Dear Maintainer,

I've attached a patch to enable installing templated units. I've tested
this on Jessie.
Works also when using dh_systemd_enable with the --name parameter and
the debian/[email protected] format.

Thank you!

Kind regards,
Luca Boccassi


From 44d48ff37841b6cf0e0690d9848c7e95cb475cb4 Mon Sep 17 00:00:00 2001
From: Luca Boccassi <[email protected]>
Date: Thu, 26 May 2016 18:24:35 +0100
Subject: [PATCH] Add support for installing templated service unit

---
 script/dh_systemd_enable | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/script/dh_systemd_enable b/script/dh_systemd_enable
index cc8f46e..f000283 100755
--- a/script/dh_systemd_enable
+++ b/script/dh_systemd_enable
@@ -147,6 +147,16 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
                doit("install","-p","-m644",$service,"$path/$script.service");
        }
 
+       my $service=pkgfile("$package@","service");
+       if ($service ne '') {
+               my $path="$tmpdir/lib/systemd/system";
+               if (! -d "$path") {
+                       doit("install","-d","$path");
+               }
+
+               doit("install","-p","-m644",$service,"$path/[email protected]");
+       }
+
        my $target=pkgfile($package,"target");
        if ($target ne '') {
                my $path="$tmpdir/lib/systemd/system";
-- 
2.1.4

Attachment: signature.asc
Description: This is a digitally signed message part

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

Reply via email to