diff --git a/xCAT-server/share/xcat/install/scripts/post.rhels7 b/xCAT-server/share/xcat/install/scripts/post.rhels7 index 571e63277..fc3ab7285 100644 --- a/xCAT-server/share/xcat/install/scripts/post.rhels7 +++ b/xCAT-server/share/xcat/install/scripts/post.rhels7 @@ -12,17 +12,3 @@ do sed -i '/HWADDR/d' $i done - if[ -f "/usr/lib/systemd/system/NetworkManager.service" ];then - systemctl stop NetworkManager - systemctl disable NetworkManager - fi - - if[ -f "/usr/lib/systemd/system/NetworkManager-dispatcher.service" ];then - systemctl stop NetworkManager-dispatcher - systemctl disable NetworkManager-dispatcher - fi - - if[ -f "/usr/lib/systemd/system/NetworkManager-wait-online.service" ];then - systemctl stop NetworkManager-wait-online - systemctl disable NetworkManager-wait-online - fi diff --git a/xCAT/postscripts/xcatinstallpost b/xCAT/postscripts/xcatinstallpost index 1f7fb68ae..47a2214ee 100755 --- a/xCAT/postscripts/xcatinstallpost +++ b/xCAT/postscripts/xcatinstallpost @@ -4,6 +4,7 @@ # # xCAT script for running postboot scripts for full install case. ################################################################# +. /xcatpost/xcatlib.sh if [ ! `uname` = Linux ]; then logger -t xcat -p local4.err "$0: the OS name is not Linux" @@ -71,6 +72,14 @@ fi " >> /xcatpost/mypostscript.post fi +stopservice NetworkManager +stopservice NetworkManager-dispatcher +stopservice NetworkManager-wait-online + +disableservice NetworkManager +disableservice NetworkManager-dispatcher +disableservice NetworkManager-wait-online + chmod +x /xcatpost/mypostscript.post if [ -x /xcatpost/mypostscript.post ];then /xcatpost/mypostscript.post