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