From f34ef1af6e4ba70e19c943ac3ef388675998b3f8 Mon Sep 17 00:00:00 2001 From: parmentelat Date: Tue, 18 Dec 2018 09:23:01 +0100 Subject: [PATCH] service and ifconfig have gone --- source/steps/ChainBootNode.py | 3 ++- source/steps/StartDebug.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/source/steps/ChainBootNode.py b/source/steps/ChainBootNode.py index 1282542..995d4ea 100644 --- a/source/steps/ChainBootNode.py +++ b/source/steps/ChainBootNode.py @@ -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) diff --git a/source/steps/StartDebug.py b/source/steps/StartDebug.py index 598121f..f913dc8 100644 --- a/source/steps/StartDebug.py +++ b/source/steps/StartDebug.py @@ -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: -- 2.43.0