X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=source%2Fsteps%2FChainBootNode.py;h=b9be9278a39e6b1d369ad47e45ce5db5c3811e94;hb=885b014c1daa6b055a7d2b435126b4263572b599;hp=128254295acce5fb862f231c3f5d8040d9840ef5;hpb=65b46e980c3feedac65796ac6ed2c335f13d8747;p=bootmanager.git diff --git a/source/steps/ChainBootNode.py b/source/steps/ChainBootNode.py index 1282542..b9be927 100644 --- a/source/steps/ChainBootNode.py +++ b/source/steps/ChainBootNode.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 # # Copyright (c) 2003 Intel Corporation # All rights reserved. @@ -114,7 +114,10 @@ def Run(vars, log): if (vars['ONE_PARTITION'] != '1'): try: - cmd = "/usr/bin/env python /usr/share/NodeManager/conf_files.py --noscripts" + # used to call /usr/bin/env python here, but as nodemanager + # now exists both in python2 and python3, we use a shebang + # in conf_files instead + cmd = "/usr/share/NodeManager/conf_files.py --noscripts" utils.sysexec_chroot(SYSIMG_PATH, cmd, log) except IOError as e: log.write("conf_files failed with \n {}".format(e)) @@ -236,7 +239,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)