diff options
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/services.pm | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/perl-install/services.pm b/perl-install/services.pm index 7c6e58ed2..cc47e8076 100644 --- a/perl-install/services.pm +++ b/perl-install/services.pm @@ -13,6 +13,7 @@ use run_program; use common; use run_program; +use File::Basename; sub description { my %services = ( @@ -293,7 +294,13 @@ sub _set_service { my ($service, $enable) = @_; if ( -f "/lib/systemd/system/$service.service" ) { - run_program::rooted($::prefix, "systemctl", $enable ? "enable" : "disable", $service . ".service"); + if ( -l "/lib/systemd/system/$service.service" ) { + $service = basename(readlink("/lib/systemd/system/$service.service")) + } + else { + $service = $service . ".service" ; + } + run_program::rooted($::prefix, "systemctl", $enable ? "enable" : "disable", $service); } else { |