[PATCH 2/4] iutil: add *opts to _run_systemctl

Will Woods wwoods at redhat.com
Wed Mar 13 19:56:14 UTC 2013


This lets us pass extra options to systemctl.
---
 pyanaconda/iutil.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pyanaconda/iutil.py b/pyanaconda/iutil.py
index bd6e048..186ba44 100644
--- a/pyanaconda/iutil.py
+++ b/pyanaconda/iutil.py
@@ -305,7 +305,7 @@ def fork_orphan():
     os.waitpid(intermediate, 0)
     return 1
 
-def _run_systemctl(command, service):
+def _run_systemctl(command, service, *opts):
     """
     Runs 'systemctl command service.service'
 
@@ -314,7 +314,7 @@ def _run_systemctl(command, service):
     """
 
     service_name = service + ".service"
-    ret = execWithRedirect("systemctl", [command, service_name])
+    ret = execWithRedirect("systemctl", [command, service_name] + opts)
 
     return ret
 
-- 
1.8.1.4



More information about the anaconda-patches mailing list