add explicit platform check to wwwfind tool
explicit platform check to avoid calling external programs with strange parameters
--- a/src/Tools/WWW_Find/lib/Tools/wwwfind Sat Nov 21 16:56:53 2009 +1100
+++ b/src/Tools/WWW_Find/lib/Tools/wwwfind Sat Nov 21 17:04:03 2009 +1100
@@ -33,6 +33,18 @@
exit 2
}
+function checkplatform()
+{
+ PLAT=$(uname -s)
+ case "$PLAT" in
+ Linux)
+ ;;
+ *)
+ fail "Platform $PLAT currently not supported by $PRG component."
+ ;;
+ esac
+}
+
function kill_by_port () {
IPADDR='[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*'
PID=$(netstat -nltp 2>/dev/null \
@@ -46,6 +58,10 @@
netstat -latp 2>/dev/null | grep ":$1 "
}
+## platform support check
+
+checkplatform
+
## process command line
case "$1" in