summaryrefslogtreecommitdiff
path: root/rc/bin/netaudit
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@gmx.de>2013-05-14 18:54:42 +0200
committercinap_lenrek <cinap_lenrek@gmx.de>2013-05-14 18:54:42 +0200
commit172b290e0535ad43ff7d783cbafaf77dadf1073e (patch)
tree60ad890b71c4f9fa0dd25be9c315d2c318b1966b /rc/bin/netaudit
parent4c6fa55456e8825fa32a5dc7f96944439426b2c7 (diff)
downloadplan9front-172b290e0535ad43ff7d783cbafaf77dadf1073e.tar.xz
netaudit: check if ipgw= is an ip address
Diffstat (limited to 'rc/bin/netaudit')
-rwxr-xr-xrc/bin/netaudit10
1 files changed, 10 insertions, 0 deletions
diff --git a/rc/bin/netaudit b/rc/bin/netaudit
index 075e73a07..f043df988 100755
--- a/rc/bin/netaudit
+++ b/rc/bin/netaudit
@@ -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'