Control: tags -1 patch On Sat, 08 Nov 2014 09:30:54 -0800 Josh Triplett <j...@joshtriplett.org> wrote: > Package: dh-systemd > Version: 1.21 > Severity: normal > File: /usr/bin/dh_systemd_enable > > dh_systemd_enable appears to support the unit types .service and > ..socket, as well as installing .tmpfile files as tmpfiles.d > configuration files. However, the manpage for dh_systemd_enable does > not document the .socket support, and I don't see any support in > dh_systemd_enable for any other kind of unit, such as .path. > > In any case, please document in the dh_systemd_enable manpage how to > handle .path units. > > - Josh Triplett
Dear Maintainer, Attached is a small patch to add support for installing and starting/stopping path units. Tested on Jessie. Thanks! Kind regards, Luca Boccassi From 13e3d38d27cfa47aa000b891528d03f045a34fa1 Mon Sep 17 00:00:00 2001 From: Luca Boccassi <luca.bocca...@gmail.com> Date: Thu, 26 May 2016 19:26:48 +0100 Subject: [PATCH] Add support for installing path units --- script/dh_systemd_enable | 12 +++++++++++- script/dh_systemd_start | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/script/dh_systemd_enable b/script/dh_systemd_enable index cc8f46e..6cd7e3d 100755 --- a/script/dh_systemd_enable +++ b/script/dh_systemd_enable @@ -101,7 +101,7 @@ sub contains_install_section { return 0; } -# PROMISE: DH NOOP WITHOUT tmp(lib/systemd/system) mount service socket target tmpfile +# PROMISE: DH NOOP WITHOUT tmp(lib/systemd/system) mount path service socket target tmpfile foreach my $package (@{$dh{DOPACKAGES}}) { my $tmpdir = tmpdir($package); @@ -187,6 +187,16 @@ foreach my $package (@{$dh{DOPACKAGES}}) { doit("install","-p","-m644",$mount,"$path/$script.mount"); } + my $pathunit=pkgfile($package,"path"); + if ($pathunit ne '') { + my $path="$tmpdir/lib/systemd/system"; + if (! -d "$path") { + doit("install","-d","$path"); + } + + doit("install","-p","-m644",$pathunit,"$path/$script.path"); + } + find({ wanted => sub { my $name = $File::Find::name; diff --git a/script/dh_systemd_start b/script/dh_systemd_start index 2d89ea4..2aa5ea9 100755 --- a/script/dh_systemd_start +++ b/script/dh_systemd_start @@ -204,7 +204,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) { push @{$aliases{$name}}, $_ for extract_key($name, 'Alias'); my @sysv = grep { my $base = $_; - $base =~ s/\.(?:mount|service|socket|target)$//g; + $base =~ s/\.(?:mount|service|socket|target|path)$//g; -f "$tmpdir/etc/init.d/$base" } ($base, @{$aliases{$name}}); if (@sysv == 0 && !grep { $_ eq $name } @units) { -- 2.1.4
signature.asc
Description: This is a digitally signed message part