[Openvas-commits] r509 - trunk/openvas-plugins/audit

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Sat Nov 3 23:30:05 CET 2007


Author: jfs
Date: 2007-11-03 23:30:04 +0100 (Sat, 03 Nov 2007)
New Revision: 509

Modified:
   trunk/openvas-plugins/audit/audit-plugins
Log:
Fix errors in the script

Modified: trunk/openvas-plugins/audit/audit-plugins
===================================================================
--- trunk/openvas-plugins/audit/audit-plugins	2007-11-02 13:58:06 UTC (rev 508)
+++ trunk/openvas-plugins/audit/audit-plugins	2007-11-03 22:30:04 UTC (rev 509)
@@ -26,7 +26,7 @@
 
 
 # Assume we are one subdirectory below in the sources
-SCRIPTDIR="../scripts"
+SCRIPTDIR="../../scripts"
 [ -n "$1" ] && SCRIPTDIR=$1  # But also use the scriptdir provided, if any
 
 if [ ! -d "$SCRIPTDIR" ] ; then
@@ -84,8 +84,8 @@
 count=0
 
 # This regexp is bound to find non-free plugins:
-for plugin in `egrep -i "script_copyright.*Tenable.*" $SCRIPTDIR/*`; do
-    if egrep -iq '(c).*Tenable Network Security' "$SCRIPTDIR/$plugin"; then
+for plugin in `egrep -li "script_copyright.*Tenable.*" $SCRIPTDIR/*`; do
+    if egrep -iq '(c).*Tenable Network Security' "$plugin"; then
         # If they have the script_copyright and the (c) then they
         # are non-free for sure
         echo "NON-FREE plugin $plugin found"
@@ -94,14 +94,14 @@
         echo "POSSIBLE NON-FREE plugin $plugin found"
         count=$(($count+1))
     fi
-fi
+done
 # This regexp might have false positives
-for plugin in `egrep -i "\(c\).*Tenable.*Network.*Security" $SCRIPTDIR/*`; do
-    if [ ! -e non-free-false-positives ] || ! grep -q ^$plugin non-free-false-positives; then
+for plugin in `egrep -li "\(c\).*Tenable.*Network.*Security" $SCRIPTDIR/*`; do
+    if [ ! -e non-free-false-positives ] || ! grep -q "^$plugin" non-free-false-positives; then
         echo "POSSIBLE NON-FREE plugin $plugin found"
         count=$(($count+1))
     fi
-fi
+done
 
 if [ $count -ne 0 ] ; then
     echo "$count NON-FREE plugins found"



More information about the Openvas-commits mailing list