Update linupx-scripts.sh
This commit is contained in:
@@ -747,6 +747,24 @@ RECONFIGURE_NETWORK(){
|
|||||||
[Nn]) ;;
|
[Nn]) ;;
|
||||||
*)
|
*)
|
||||||
echo -en "${idsCL[LightCyan]}Making configuration changes ... ${idsCL[Default]}"
|
echo -en "${idsCL[LightCyan]}Making configuration changes ... ${idsCL[Default]}"
|
||||||
|
|
||||||
|
if [ -f /etc/netplan/99-netcfg-* ]; then
|
||||||
|
rm -f /etc/netplan/*.yaml >/dev/null 2>&1
|
||||||
|
mv /etc/netplan/eth0* /etc/netplan/eth0.yaml
|
||||||
|
if [ ! -f /etc/netplan/eth0.yaml ]; then
|
||||||
|
echo -e "network:
|
||||||
|
version: 2
|
||||||
|
renderer: networkd
|
||||||
|
ethernets:
|
||||||
|
eth0:
|
||||||
|
dhcp4: no
|
||||||
|
addresses: [10.5.4.20/20]
|
||||||
|
gateway4: 10.5.1.1
|
||||||
|
nameservers:
|
||||||
|
addresses: [10.10.10.10,10.10.10.11]
|
||||||
|
" > /etc/netplan/eth0.yaml
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
hostnamectl set-hostname ${HOSTNAME} >/dev/null 2>&1
|
hostnamectl set-hostname ${HOSTNAME} >/dev/null 2>&1
|
||||||
sed -i '/127.0.1.1/d' /etc/hosts >/dev/null 2>&1
|
sed -i '/127.0.1.1/d' /etc/hosts >/dev/null 2>&1
|
||||||
|
|||||||
Reference in New Issue
Block a user