summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2012-04-24 20:10:40 +0000
committerColin Guthrie <colin@mageia.org>2012-04-24 20:10:40 +0000
commit6dbd7f22b36a233d9d9b06434a0726736871c464 (patch)
tree5081e5e0b2a82a2a4d4aeffd9996091ef16a041c
parentee32a1df3e137b60d05ebcf3c8a05a826c71c433 (diff)
downloaddrakx-backup-do-not-use-6dbd7f22b36a233d9d9b06434a0726736871c464.tar
drakx-backup-do-not-use-6dbd7f22b36a233d9d9b06434a0726736871c464.tar.gz
drakx-backup-do-not-use-6dbd7f22b36a233d9d9b06434a0726736871c464.tar.bz2
drakx-backup-do-not-use-6dbd7f22b36a233d9d9b06434a0726736871c464.tar.xz
drakx-backup-do-not-use-6dbd7f22b36a233d9d9b06434a0726736871c464.zip
services: Whitespace and comments
-rw-r--r--perl-install/services.pm14
1 files changed, 7 insertions, 7 deletions
diff --git a/perl-install/services.pm b/perl-install/services.pm
index 70c88b03d..179fe0972 100644
--- a/perl-install/services.pm
+++ b/perl-install/services.pm
@@ -306,13 +306,13 @@ sub _set_service {
if (member($service, @xinetd_services)) {
run_program::rooted($::prefix, "chkconfig", $enable ? "--add" : "--del", $service);
} elsif (running_systemd() or has_systemd()) {
- if (-l "/lib/systemd/system/$service.service") {
- $service = basename(readlink("/lib/systemd/system/$service.service"));
- }
- else {
- $service = $service . ".service";
- }
- run_program::rooted($::prefix, "/bin/systemctl", $enable ? "enable" : "disable", $service);
+ # systemctl rejects any symlinked units. You have to enabled the real file
+ if (-l "/lib/systemd/system/$service.service") {
+ $service = basename(readlink("/lib/systemd/system/$service.service"));
+ } else {
+ $service = $service.".service";
+ }
+ run_program::rooted($::prefix, "/bin/systemctl", $enable ? "enable" : "disable", $service);
} else {
my $script = "/etc/rc.d/init.d/$service";
run_program::rooted($::prefix, "chkconfig", $enable ? "--add" : "--del", $service);