service and ifconfig have gone
authorparmentelat <thierry.parmentelat@inria.fr>
Tue, 18 Dec 2018 08:23:01 +0000 (09:23 +0100)
committerparmentelat <thierry.parmentelat@inria.fr>
Tue, 18 Dec 2018 08:23:01 +0000 (09:23 +0100)
source/steps/ChainBootNode.py
source/steps/StartDebug.py

index 1282542..995d4ea 100644 (file)
@@ -236,7 +236,8 @@ def Run(vars, log):
     # there are a few buggy drivers that don't disable their hardware
     # correctly unless they are first unloaded.
 
-    utils.sysexec_noerr("ifconfig eth0 down", log)
+    utils.sysexec_noerr("ifconfig eth0 down || /usr/libexec/nm-ifdown eth0",
+                        log, shell=True)
 
     utils.sysexec_noerr("killall dhclient", log)
 
index 598121f..f913dc8 100644 (file)
@@ -120,7 +120,8 @@ def Run(vars, log, last_resort = True):
     # start sshd
     if not os.path.isfile(sshd_started_flag):
         log.write("Starting sshd\n")
-        utils.sysexec("service sshd start", log)
+        utils.sysexec("service sshd start || systemctl start sshd",
+                      log, shell=True)
         # flag that ssh is running
         utils.sysexec("touch {}".format(sshd_started_flag), log)
     else: