summaryrefslogtreecommitdiff
path: root/script/deb-systemd-invoke
diff options
context:
space:
mode:
Diffstat (limited to 'script/deb-systemd-invoke')
-rwxr-xr-xscript/deb-systemd-invoke11
1 files changed, 11 insertions, 0 deletions
diff --git a/script/deb-systemd-invoke b/script/deb-systemd-invoke
index fbc5aea..c9254ce 100755
--- a/script/deb-systemd-invoke
+++ b/script/deb-systemd-invoke
@@ -47,6 +47,11 @@ systemd unit files. It is specifically NOT intended to be used interactively by
users. Instead, users should run systemd and use systemctl, or not bother about
the systemd enabled state in case they are not running systemd.
+=head1 NOTES
+
+This command currently works on Linux only, on other Debian archs
+it does nothing and returns 0;
+
=cut
use strict;
@@ -57,6 +62,12 @@ if (@ARGV < 2) {
exit 1;
}
+my $deb_host_arch_os = `dpkg-architecture -qDEB_HOST_ARCH_OS`;
+if ($deb_host_arch_os !~ /linux/) {
+ print STDERR "systemd is unsupported on $deb_host_arch_os\n";
+ exit(0);
+}
+
my $policyhelper = '/usr/sbin/policy-rc.d';
my @units = @ARGV;
my $action = shift @units;