From 172b290e0535ad43ff7d783cbafaf77dadf1073e Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Tue, 14 May 2013 18:54:42 +0200 Subject: netaudit: check if ipgw= is an ip address --- rc/bin/netaudit | 10 ++++++++++ 1 file changed, 10 insertions(+) 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' -- cgit v1.2.3