Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 3189 → Rev 3190

/scripts/alcasar-conf.sh
212,7 → 212,7
--apply|-apply)
PTN="\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\/([012]?[0-9]|3[0-2])\b"
PRIVATE_IP_MASK=`grep ^PRIVATE_IP= $CONF_FILE|cut -d"=" -f2`
if ! echo $PRIVATE_IP_MASK | egrep -q $PTN
if ! echo $PRIVATE_IP_MASK | grep -q -E $PTN
then
echo "Syntax error for PRIVATE_IP_MASK ($PRIVATE_IP_MASK)"
exit 0
226,7 → 226,7
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
if ! echo $PUBLIC_IP_MASK | grep -q -E $PTN
then
echo "Syntax error for PUBLIC_IP_MASK ($PUBLIC_IP_MASK)"
exit 0
234,19 → 234,19
PUBLIC_IP=`echo $PUBLIC_IP_MASK | cut -d"/" -f1`
PUBLIC_NETMASK=`/bin/ipcalc -m $PUBLIC_IP_MASK | cut -d"=" -f2`
PUBLIC_GATEWAY=`grep ^GW= $CONF_FILE|cut -d"=" -f2`
if ! echo $PUBLIC_GATEWAY | egrep -q $PTN
if ! echo $PUBLIC_GATEWAY | grep -q -E $PTN
then
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
if ! echo $DNS1 | grep -q -E $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
if ! echo $DNS2 | grep -q -E $PTN
then
echo "Syntax error for the IP address of the second DNS server ($DNS2)"
exit 0