Update linupx-scripts.sh
This commit is contained in:
@@ -728,12 +728,10 @@ ONBOOT=yes
|
||||
IPADDR=10.10.4.20
|
||||
PREFIX=16
|
||||
GATEWAY=10.10.0.1
|
||||
DNS1=10.10.10.10
|
||||
DNS2=10.10.10.11
|
||||
IPV6_DISABLED=yes
|
||||
" > /etc/sysconfig/network-scripts/ifcfg-eth0
|
||||
|
||||
/usr/bin/nmcli connection up eth0
|
||||
/usr/bin/nmcli connection up eth0 >/dev/null 2>&1
|
||||
|
||||
fi
|
||||
|
||||
@@ -819,17 +817,13 @@ IPV6_DISABLED=yes
|
||||
|
||||
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.dns "${PRIDNS}"
|
||||
[ "${SECDNS}" != "" ] && nmcli connection modify eth0 ipv4.dns "${SECDNS}"
|
||||
|
||||
[ "${SECDNS}" != "" ] && /usr/bin/nmcli connection modify eth0 ipv4.dns "${SECDNS}"
|
||||
/usr/bin/nmcli connection modify eth0 ipv4.gateway ${GATEWAY}
|
||||
|
||||
[ "${DOMAIN}" != "" ] && nmcli connection modify eth0 ipv4.dns-search ${DOMAIN}
|
||||
|
||||
nmcli connection modify eth0 ipv4.method manual
|
||||
|
||||
/usr/bin/nmcli connection up eth0
|
||||
[ "${DOMAIN}" != "" ] && /usr/bin/nmcli connection modify eth0 ipv4.dns-search ${DOMAIN}
|
||||
/usr/bin/nmcli connection modify eth0 ipv4.method manual
|
||||
/usr/bin/nmcli connection modify eth0 ipv6.method disabled
|
||||
/usr/bin/nmcli connection up eth0 >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
echo -e "${idsCL[Green]}Done${idsCL[Default]}"
|
||||
|
||||
Reference in New Issue
Block a user