mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-30 17:46:38 +00:00
modify the postscripts to support SLE15
This commit is contained in:
parent
b4ce59ce92
commit
002d52a493
@ -74,6 +74,9 @@ if [ "$str_os_type" = "linux" ];then
|
||||
elif [ -f "/etc/SuSE-release" -o -n "$str_temp" ];then
|
||||
str_os_type="sles"
|
||||
str_cfg_dir="/etc/sysconfig/network"
|
||||
elif [ -f /etc/os-release ] && cat /etc/os-release |grep NAME|grep -i SLE >/dev/null; then
|
||||
str_os_type="sles"
|
||||
str_cfg_dir="/etc/sysconfig/network"
|
||||
else
|
||||
showmsg "Only supports RHEL and SLES" "error"
|
||||
exit -1
|
||||
|
@ -413,6 +413,9 @@ if [ "$str_os_type" = "linux" ];then
|
||||
elif [ -f "/etc/SuSE-release" -o -n "$str_temp" ];then
|
||||
str_os_type="sles"
|
||||
str_cfg_dir="/etc/sysconfig/network/"
|
||||
elif [ -f /etc/os-release ] && cat /etc/os-release |grep NAME|grep -i SLE >/dev/null; then
|
||||
str_os_type="sles"
|
||||
str_cfg_dir="/etc/sysconfig/network"
|
||||
else
|
||||
str_os_type="redhat"
|
||||
str_cfg_dir="/etc/sysconfig/network-scripts/"
|
||||
|
@ -42,6 +42,9 @@ if [ -f "/etc/redhat-release" ];then
|
||||
elif [ -f "/etc/SuSE-release" -o -n "$str_temp" ];then
|
||||
is_sles=1
|
||||
nwdir="/etc/sysconfig/network"
|
||||
elif [ -f /etc/os-release ] && cat /etc/os-release |grep NAME|grep -i SLE >/dev/null; then
|
||||
is_sles=1
|
||||
nwdir="/etc/sysconfig/network"
|
||||
elif [ -f "/etc/debian_version" ];then
|
||||
nwdir="/etc/network/interfaces.d"
|
||||
is_debian=1
|
||||
|
@ -50,12 +50,16 @@ if [ -f /etc/os-release ] && (cat /etc/os-release |grep -i '^NAME=[ "]*Cumulus
|
||||
OSVER="cumulus"
|
||||
fi
|
||||
|
||||
if [ -f /etc/os-release ] && (cat /etc/os-release |grep NAME|grep -i SLE >/dev/null); then
|
||||
OSVER="SLE"
|
||||
fi
|
||||
|
||||
defgw=`ip route | grep default | awk '{print $3}' | head -n1`
|
||||
if ( pmatch $OSVER "ubuntu*" ) || (pmatch $OSVER "cumulus")
|
||||
then
|
||||
echo `hostname` >/etc/hostname
|
||||
mv /etc/network/interfaces /etc/network/interfaces.old # this file will be filled up next
|
||||
elif [ -f /etc/SuSE-release ]
|
||||
elif [ -f /etc/SuSE-release ] || (pmatch $OSVER "SLE")
|
||||
then
|
||||
#SLES9 and SLES10, uses /etc/sysconfig/network/ifcfg-eth-id-<mac>
|
||||
#SLES11, uses /etc/sysconfig/network/ifcfg-eth<x>
|
||||
|
Loading…
x
Reference in New Issue
Block a user