netaudit: check if ipgw= is an ip address

This commit is contained in:
cinap_lenrek 2013-05-14 18:54:42 +02:00
parent 4c6fa55456
commit 172b290e05

View file

@ -38,6 +38,16 @@ fn checknet {
}
if not
echo ' we are in ipnet='^$ipnet
ipgw=`{ndb/ipquery sys $sysname ipgw | sed 's/^ipgw=//'}
if(~ $ipgw '' '::'){
echo ' we do not have an internet gateway, no ipgw= entry'
}
if not {
if(! ~ $ipgw *.*.*.* *:*:*:*:*:*:*:* *::*)
echo ' ipgw='$ipgw 'does not look like an ip address'
if not
echo ' ipgw='$ipgw 'looks ok'
}
dns=`{ndb/ipquery sys $sysname dns | sed 's/^dns=//'}
if(~ $dns '')
echo ' no dns= entry'