diff options
author | Niels Thykier <niels@thykier.net> | 2017-10-08 09:34:47 +0000 |
---|---|---|
committer | Niels Thykier <niels@thykier.net> | 2017-10-08 09:37:46 +0000 |
commit | aaf90aff170e29fda86227583f6ce318dad7defd (patch) | |
tree | b05f983359aa6bbd18247967faf3dd548650326a /dh_systemd_enable | |
parent | f1491a219311210e190c74671f1c4cd209bb77bf (diff) | |
download | debhelper-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-x | dh_systemd_enable | 14 |
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; |