[Dnssec-trigger] [PATCH 2/3] dnssec-trigger-script: Silence the calls to chattr

Tomas Hozza thozza at redhat.com
Thu May 19 14:48:53 UTC 2016


The call may fail e.g. when TMPFS is used on /var/run and produces unnecessary errors

Signed-off-by: Tomas Hozza <thozza at redhat.com>
---
 dnssec-trigger-script.in | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dnssec-trigger-script.in b/dnssec-trigger-script.in
index e9134dd..5f70580 100644
--- a/dnssec-trigger-script.in
+++ b/dnssec-trigger-script.in
@@ -525,11 +525,11 @@ class Application:
             pass
 
     def _try_set_immutable(self, path):
-        subprocess.call(["chattr", "+i", path])
+        subprocess.call(["chattr", "+i", path], stdout=DEVNULL, stderr=DEVNULL)
 
     def _try_set_mutable(self, path):
         if os.path.exists(path) and not os.path.islink(path):
-            subprocess.call(["chattr", "-i", path])
+            subprocess.call(["chattr", "-i", path], stdout=DEVNULL, stderr=DEVNULL)
 
     def _restart_nm(self):
         if os.path.exists(self.resolvconf_networkmanager):
-- 
2.5.5




More information about the dnssec-trigger mailing list