summaryrefslogtreecommitdiff
path: root/dh_installsystemd
diff options
context:
space:
mode:
authorDaniele Nicolodi <daniele@grinta.net>2018-06-12 20:49:13 -0600
committerDaniele Nicolodi <daniele@grinta.net>2018-06-16 11:19:14 -0600
commitb54a77c72e0e9e6850dcc4cf2aed92f81c6497c4 (patch)
treef5948b4595158cad3a39b1d46d52264c8f4a552d /dh_installsystemd
parenta1afd1bc4808235b39db9d2a7e1cffd8d86743e7 (diff)
dh_installsystemd: Simplify error handling
The intention was to carry on all possible work and report missing unit files specified on the command line at the end of execution. However, now the scripts fails immediately when it tries to read the content of the unit filed and the late check is never executed. Remove the late check.
Diffstat (limited to 'dh_installsystemd')
-rwxr-xr-xdh_installsystemd16
1 files changed, 0 insertions, 16 deletions
diff --git a/dh_installsystemd b/dh_installsystemd
index 308cde41..0f13cac8 100755
--- a/dh_installsystemd
+++ b/dh_installsystemd
@@ -201,9 +201,6 @@ sub extract_key {
# PROMISE: DH NOOP WITHOUT tmp(lib/systemd/system) tmp(usr/lib/tmpfiles.d) tmp(etc/tmpfiles.d) mount path service socket target tmpfile timer
-my %requested_files = map { basename($_) => 1 } @ARGV;
-my %installed_files;
-
my %snippet_options = ('snippet-order' => 'service');
@@ -324,8 +321,6 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
}
}
- $installed_files{$base} = 1 if exists($requested_files{$base});
-
# Skip template service files like e.g. getty@.service.
# Enabling, disabling, starting or stopping those services
# without specifying the instance (e.g. getty@ttyS0.service) is
@@ -402,17 +397,6 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
}
}
-if (%requested_files) {
- my $any_missing = 0;
- for my $name (sort(keys(%requested_files))) {
- if (not exists($installed_files{$name})) {
- warning(qq{Requested unit "$name" but it was not found in any package acted on.});
- $any_missing = 1;
- }
- }
- error("Could not handle all of the requested services") if $any_missing;
-}
-
=head1 SEE ALSO
L<debhelper(7)>, L<dh_installinit(1)>, L<deb-systemd-helper(1)>