File git-15-39beb10d05082324d93a68c087d017efb9592e91.patch of Package aaa_base.4819

commit 39beb10d05082324d93a68c087d017efb9592e91
Author: Ludwig Nussel <ludwig.nussel@suse.de>
Date:   Mon Dec 21 14:00:00 2015 +0100

    make chkconfig -a/-d work (bsc#926539)

diff --git a/files/usr/bin/chkconfig b/files/usr/bin/chkconfig
index 36d4602..3879638 100755
--- a/files/usr/bin/chkconfig
+++ b/files/usr/bin/chkconfig
@@ -753,15 +753,17 @@ if ($mode eq 's') {
 my $status = 0;
 if ($mode eq 'a' || $mode eq 'd') {
   for $s (splice @services) {
-    if (!$known_all{$s}) {
-      print STDERR "$s: unknown service\n";
-      $status = 1;
-      next;
-    }
-    if (!$known_rc{$s}) {
-      print STDERR "$s: not a runlevel service\n";
-      $status = 1;
-      next;
+    if (!is_overriden_by_systemd($s, $root)) {
+      if (!$known_all{$s}) {
+	print STDERR "$s: unknown service\n";
+	$status = 1;
+	next;
+      }
+      if (!$known_rc{$s}) {
+	print STDERR "$s: not a runlevel service\n";
+	$status = 1;
+	next;
+      }
     }
     push @services, $s;
   }
@@ -790,7 +792,7 @@ if ($mode eq 'a' || $mode eq 'd') {
 }
 if ($mode eq 'l' || $mode eq 'L') {
   my $usecolor = -t STDOUT;
-  if (is_systemd_active()) {
+  if (is_systemd_active() && @services) {
       print STDERR <<EOF;
 
 Note: This output shows SysV services only and does not include native
openSUSE Build Service is sponsored by