Tests - eventscripts - nmap and netstat stubs can pretend they weren't found
authorMartin Schwenke <martin@meltin.net>
Mon, 22 Aug 2011 06:14:55 +0000 (16:14 +1000)
committerMartin Schwenke <martin@meltin.net>
Tue, 30 Aug 2011 06:51:55 +0000 (16:51 +1000)
Signed-off-by: Martin Schwenke <martin@meltin.net>
tests/eventscripts/stubs/netstat
tests/eventscripts/stubs/nmap

index 5a3e3c7e77e9216eb5736da11f397217fbdb108a..f46c9365193622152efcb27130bae7db9ea5b6b0 100755 (executable)
@@ -2,6 +2,13 @@
 
 prog="netstat"
 
+# Pretty that we're the shell and that this command could not be
+# found.
+if [ "$FAKE_NETSTAT_NOT_FOUND" = "yes" ] ; then
+    echo "sh: ${prog}: command not found" >&2
+    exit 127
+fi
+
 usage ()
 {
     cat >&2 <<EOF
index 15eebe6901f33f2ea47b43e43e3fa6a5abfa1a6b..f01fe32d9c4964abb35543eb7460a831f523f6f3 100755 (executable)
@@ -2,6 +2,13 @@
 
 prog="nmap"
 
+# Pretty that we're the shell and that this command could not be
+# found.
+if [ "$FAKE_NMAP_NOT_FOUND" = "yes" ] ; then
+    echo "sh: ${prog}: command not found" >&2
+    exit 127
+fi
+
 usage ()
 {
     cat >&2 <<EOF