From aaf90aff170e29fda86227583f6ce318dad7defd Mon Sep 17 00:00:00 2001 From: Niels Thykier Date: Sun, 8 Oct 2017 09:34:47 +0000 Subject: dh_systemd_enable: Fix regression in installation of template units Signed-off-by: Niels Thykier --- dh_systemd_enable | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'dh_systemd_enable') 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; -- cgit v1.2.3