Update linupx-scripts.sh
This commit is contained in:
@@ -730,11 +730,10 @@ PREFIX=16
|
||||
GATEWAY=10.10.0.1
|
||||
DNS1=10.10.10.10
|
||||
DNS2=10.10.10.11
|
||||
DOMAIN="scity.us schroedercity.com"
|
||||
IPV6_DISABLED=yes
|
||||
" > /etc/sysconfig/network-scripts/ifcfg-eth0 >/dev/null 2>&1
|
||||
|
||||
/usr/bin/nmcli connection up ETH0
|
||||
/usr/bin/nmcli connection up eth0
|
||||
|
||||
fi
|
||||
|
||||
@@ -814,21 +813,21 @@ IPV6_DISABLED=yes
|
||||
sed -i "s/${REPGW}/${GATEWAY}/g" /etc/netplan/eth0.yaml >/dev/null 2>&1
|
||||
|
||||
sed -i '/search/d' /etc/netplan/eth0.yaml >/dev/null 2>&1
|
||||
if [ "${DOMAIN}" != "" ]; then
|
||||
echo " search: [${DOMAIN}]" >> /etc/netplan/eth0.yaml
|
||||
fi
|
||||
[ "${DOMAIN}" != "" ] && echo " search: [${DOMAIN}]" >> /etc/netplan/eth0.yaml
|
||||
|
||||
netplan apply
|
||||
|
||||
elif [ -f /etc/sysconfig/network-scripts/ifcfg-eth0 ]; then
|
||||
/usr/bin/nmcli connection modify ETH0 ipv4.addresses ${IPADDRESS}/${NEWSUB}
|
||||
/usr/bin/nmcli connection modify eth0 ipv4.addresses ${IPADDRESS}/${NEWSUB}
|
||||
|
||||
/usr/bin/nmcli connection modify ETH0 ipv4.dns "${PRIDNS}"
|
||||
[ "${SECDNS}" != "" ] && nmcli connection modify ETH0 ipv4.dns "${SECDNS}"
|
||||
/usr/bin/nmcli connection modify eth0 ipv4.dns "${PRIDNS}"
|
||||
[ "${SECDNS}" != "" ] && nmcli connection modify eth0 ipv4.dns "${SECDNS}"
|
||||
|
||||
/usr/bin/nmcli connection modify ETH0 ipv4.gateway ${GATEWAY}
|
||||
/usr/bin/nmcli connection modify eth0 ipv4.gateway ${GATEWAY}
|
||||
|
||||
[ "${DOMAIN}" != "" ] && echo "DOMAIN=\"scity.us schroedercity.com\"" >> /etc/sysconfig/network-scripts/ifcfg-eth0
|
||||
|
||||
/usr/bin/nmcli connection up ETH0
|
||||
/usr/bin/nmcli connection up eth0
|
||||
fi
|
||||
|
||||
echo -e "${idsCL[Green]}Done${idsCL[Default]}"
|
||||
|
||||
Reference in New Issue
Block a user