summaryrefslogtreecommitdiff
path: root/dh_systemd_enable
diff options
context:
space:
mode:
authorNiels Thykier <niels@thykier.net>2017-10-08 09:34:47 +0000
committerNiels Thykier <niels@thykier.net>2017-10-08 09:37:46 +0000
commitaaf90aff170e29fda86227583f6ce318dad7defd (patch)
treeb05f983359aa6bbd18247967faf3dd548650326a /dh_systemd_enable
parentf1491a219311210e190c74671f1c4cd209bb77bf (diff)
downloaddebhelper-aaf90aff170e29fda86227583f6ce318dad7defd.tar.gz
dh_systemd_enable: Fix regression in installation of template units
Signed-off-by: Niels Thykier <niels@thykier.net>
Diffstat (limited to 'dh_systemd_enable')
-rwxr-xr-xdh_systemd_enable14
1 files changed, 6 insertions, 8 deletions
diff --git a/dh_systemd_enable b/dh_systemd_enable
index a2b0cfa5..d9686200 100755
--- a/dh_systemd_enable
+++ b/dh_systemd_enable
@@ -178,16 +178,14 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
$script=$package;
}
- foreach my $suffix ('', '@') {
- install_unit("$package$suffix", $script, 'service', "$tmpdir/lib/systemd/system");
- install_unit("$package$suffix", $script, 'target', "$tmpdir/lib/systemd/system");
- install_unit("$package$suffix", $script, 'socket', "$tmpdir/lib/systemd/system");
- install_unit("$package$suffix", $script, 'mount', "$tmpdir/lib/systemd/system") if $suffix eq '';
- install_unit("$package$suffix", $script, 'path', "$tmpdir/lib/systemd/system");
- install_unit("$package$suffix", $script, 'tmpfile', "$tmpdir/usr/lib/tmpfiles.d", 'conf') if $suffix eq '';
- install_unit("$package$suffix", $script, 'timer', "$tmpdir/lib/systemd/system");
+ for my $service_type (qw(service target socket path timer)) {
+ install_unit($package, $script, $service_type, "$tmpdir/lib/systemd/system");
+ install_unit("${package}@", "${script}@", $service_type, "$tmpdir/lib/systemd/system");
}
+ install_unit($package, $script, 'mount', "$tmpdir/lib/systemd/system");
+ install_unit($package, $script, 'tmpfile', "$tmpdir/usr/lib/tmpfiles.d", 'conf');
+
find({
wanted => sub {
my $name = $File::Find::name;