sos/0024-Replace-package-check-with-file-check-in-anacron.patch
Bryn M. Reeves 5261563507 Update sos to 3.1
Update sos to the 3.1 upstream release and add post-release patches
from the development tree.
2014-04-01 12:25:00 +01:00

34 lines
1.1 KiB
Diff

From 3dac227dde7af1168fa3c668836d7dde711981bd Mon Sep 17 00:00:00 2001
From: "Bryn M. Reeves" <bmr@redhat.com>
Date: Mon, 3 Mar 2014 13:56:23 +0000
Subject: [PATCH 24/61] Replace package check with file check in anacron
The anacron facility may be provided by packages named 'anacron',
'chronie-anacron' etc. They all use a common /etc/anacrontab file
so check for this instead.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
---
sos/plugins/anacron.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/sos/plugins/anacron.py b/sos/plugins/anacron.py
index a60c85e..e9595a8 100644
--- a/sos/plugins/anacron.py
+++ b/sos/plugins/anacron.py
@@ -21,7 +21,9 @@ class Anacron(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
plugin_name = 'anacron'
- packages = ('anacron',)
+ # anacron may be provided by anacron, cronie-anacron etc.
+ # just look for the configuration file which is common
+ files = ('/etc/anacrontab',)
def setup(self):
- self.add_copy_spec("/etc/anacrontab")
+ self.add_copy_specs(list(self.files))
--
1.7.11.7