Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 2946 → Rev 2947

/scripts/alcasar-conf.sh
219,6 → 219,9
if [[ "$PUBLIC_IP_MASK" == "dhcp" ]]
then
PUBLIC_GATEWAY="dhcp"
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`
else
if ! echo $PUBLIC_IP_MASK | egrep -q $PTN
then
233,19 → 236,19
echo "Syntax error for the Gateway IP ($PUBLIC_GATEWAY)"
exit 0
fi
DNS1=`grep ^DNS1= $CONF_FILE|cut -d"=" -f2`
if ! echo $DNS1 | egrep -q $PTN
then
echo "Syntax error for the IP address of the first DNS server ($DNS1)"
exit 0
fi
DNS2=`grep ^DNS2= $CONF_FILE|cut -d"=" -f2`
if ! echo $DNS2 | egrep -q $PTN
then
echo "Syntax error for the IP address of the second DNS server ($DNS2)"
exit 0
fi
fi
DNS1=`grep ^DNS1= $CONF_FILE|cut -d"=" -f2`
if ! echo $DNS1 | egrep -q $PTN
then
echo "Syntax error for the IP address of the first DNS server ($DNS1)"
exit 0
fi
DNS2=`grep ^DNS2= $CONF_FILE|cut -d"=" -f2`
if ! echo $DNS2 | egrep -q $PTN
then
echo "Syntax error for the IP address of the second DNS server ($DNS2)"
exit 0
fi
PRIVATE_IP=`echo $PRIVATE_IP_MASK | cut -d"/" -f1`
PRIVATE_NETMASK=`/bin/ipcalc -m $PRIVATE_IP_MASK | cut -d"=" -f2`
private_network_calc
266,9 → 269,9
# Set the local DNS (or not)
if [ "$INT_DNS_mode" = "on" ] || [ "$INT_DNS_mode" = "On" ] || [ "$INT_DNS_mode" = "ON" ]
then
$DIR_BIN/alcasar-dns-local.sh --on
$DIR_BIN/alcasar-dns-local.sh --on-without-restart
else
$DIR_BIN/alcasar-dns-local.sh --off
$DIR_BIN/alcasar-dns-local.sh --off-without-restart
fi
# Set the pure ip option (or not)
if [ "$BL_PUREIP" = "off" ] || [ "$BL_PUREIP" = "Off" ] || [ "$BL_PUREIP" = "OFF" ]