netaudit: check if ipgw= is an ip address
This commit is contained in:
parent
4c6fa55456
commit
172b290e05
1 changed files with 10 additions and 0 deletions
|
@ -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'
|
||||
|
|
Loading…
Reference in a new issue