Bugfix.
authorMarta Carbone <marta@prova.iet.unipi.it>
Wed, 18 Nov 2009 16:49:57 +0000 (16:49 +0000)
committerMarta Carbone <marta@prova.iet.unipi.it>
Wed, 18 Nov 2009 16:49:57 +0000 (16:49 +0000)
exec/ipfw-be

index 27b4fb8..834b460 100755 (executable)
@@ -213,7 +213,7 @@ add_rule() { # new_rule slice_id type arg rule pipe_base timeout
 
     [ "$TEST" = "1" ] && return
     # add to the database, at least to adjust the timeout
-    ( grep -v -- "^${slice_id} ${type} ${arg}" $DBFILE;  \
+    ( grep -v -- "^${slice_id} ${type} ${arg} " $DBFILE;  \
        echo "${slice_id} ${type} ${arg} ${rule_base} ${pipe_base} ${timeout}" ) > ${DBFILE}.tmp
     mv ${DBFILE}.tmp ${DBFILE}
 }
@@ -238,7 +238,7 @@ do_delete() { # slice_id type arg
     echo "removed configuration $slice_id} ${type} ${arg}"
     [ "$TEST" = "1" ] && return
     # remove from the database
-    grep -v -- "^${slice_id} ${type} ${arg}" $DBFILE > ${DBFILE}.tmp
+    grep -v -- "^${slice_id} ${type} ${arg} " $DBFILE > ${DBFILE}.tmp
     mv ${DBFILE}.tmp ${DBFILE}
 }