ensure that we only remove fully-matching lines once we have found them
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Mon, 25 Oct 2010 20:20:23 +0000 (16:20 -0400)
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Mon, 25 Oct 2010 20:20:23 +0000 (16:20 -0400)
src/share/common

index a6da309240e34bb4652e224080c7b01bef7d25d6..491592306a0f641a77b6a11b42518a037fc07385 100644 (file)
@@ -346,7 +346,7 @@ remove_line() {
        log debug "removing matching key lines..."
        tempfile=$(mktemp "${file}.XXXXXXX") || \
            failure "Unable to make temp file '${file}.XXXXXXX'"
-       grep -v -F "$lines" "$file" >"$tempfile"
+       grep -v -x -F "$lines" "$file" >"$tempfile"
        mv -f "$tempfile" "$file"
     fi
 }