2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-08-20 18:20:27 +00:00

fix defect 4653 [FVT]:NetworkManager restarted on rh7 CN and which causes installnic losing ip, systemd does not work in chrooted context

This commit is contained in:
immarvin
2015-07-06 05:10:16 -04:00
parent 58e9a82d3f
commit cf329183c8
2 changed files with 9 additions and 14 deletions

View File

@@ -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

View File

@@ -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