summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2016-09-21 22:57:15 +0300
committerIgor Pashev <pashev.igor@gmail.com>2016-09-21 22:57:15 +0300
commit8542099257f8457970df5d001dd0ac1f632951fb (patch)
treea4022b4e716d64810bba52ece7b99ac4e2baa1e4
parent296138c560140868ab58e20a8ff5e86d18b55dfc (diff)
downloaddebhelper-8542099257f8457970df5d001dd0ac1f632951fb.tar.gz
dh_systemd_* are stubs on non-linux
-rwxr-xr-xdh_systemd_enable7
-rwxr-xr-xdh_systemd_start7
2 files changed, 14 insertions, 0 deletions
diff --git a/dh_systemd_enable b/dh_systemd_enable
index 064adc86..d4c83338 100755
--- a/dh_systemd_enable
+++ b/dh_systemd_enable
@@ -10,6 +10,13 @@ use strict;
use Debian::Debhelper::Dh_Lib;
use File::Find;
+my $deb_host_arch_os = dpkg_architecture_value('DEB_HOST_ARCH_OS');
+if ($deb_host_arch_os ne 'linux')
+{
+ warning("systemd is unsupported on $deb_host_arch_os, doing nothing");
+ exit(0);
+}
+
=head1 SYNOPSIS
B<dh_systemd_enable> [S<I<debhelper options>>] [B<--no-enable>] [B<--name=>I<name>] [S<I<unit file> ...>]
diff --git a/dh_systemd_start b/dh_systemd_start
index 9914bbd1..1540ab7f 100755
--- a/dh_systemd_start
+++ b/dh_systemd_start
@@ -11,6 +11,13 @@ use Debian::Debhelper::Dh_Lib;
use File::Find;
use Cwd qw(getcwd abs_path);
+my $deb_host_arch_os = dpkg_architecture_value('DEB_HOST_ARCH_OS');
+if ($deb_host_arch_os ne 'linux')
+{
+ warning("systemd is unsupported on $deb_host_arch_os, doing nothing");
+ exit(0);
+}
+
=head1 SYNOPSIS
B<dh_systemd_start> [S<I<debhelper options>>] [B<--restart-after-upgrade>] [B<--no-restart-on-upgrade>] [S<I<unit file> ...>]