/alcasar.sh |
---|
589,6 → 589,9 |
IP_SETTING=`grep BOOTPROTO /etc/sysconfig/network-scripts/ifcfg-$EXTIF|cut -d"=" -f2` # test static or dynamic |
if [ $IP_SETTING == "dhcp" ] |
then |
DHCP_DNS_servers=`cat /var/lib/dhclient/dhclient--$EXTIF.lease |grep domain-name-servers|sed -n "1 p"| rev|cut -d" " -f1|rev|tr -d ';'` |
DNS1=`echo $DHCP_DNS_servers | cut -d"," -f1` |
DNS2=`echo $DHCP_DNS_servers | cut -d"," -f2` |
echo "PUBLIC_IP=dhcp" >> $CONF_FILE |
echo "GW=dhcp" >> $CONF_FILE |
else |