From f4f9b32db002540cc10488c1b7f24affc59f147c Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Sun, 5 Jun 2016 16:21:59 -0700 Subject: [PATCH] Always disable or enable if the action exists --- init/init-lib.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init/init-lib.pl b/init/init-lib.pl index 3071585b7..750bd001e 100755 --- a/init/init-lib.pl +++ b/init/init-lib.pl @@ -632,7 +632,7 @@ enabled), only the first parameter needs to be given. sub enable_at_boot { local $st = &action_status($_[0]); -return if ($st == 2); # already starting! +return if ($st == 0); # does not exist local ($daemon, %daemon); local $unit = $_[0]; $unit .= ".service" if ($unit !~ /\.service$/); @@ -1025,7 +1025,7 @@ sub disable_at_boot { my ($name) = @_; local $st = &action_status($_[0]); -return if ($st != 2); # not currently starting +return if ($st == 0); # does not exist local $unit = $_[0]; $unit .= ".service" if ($unit !~ /\.service$/);