From 1e4de3521ac7c611a5e25e8e68acce7f58d90645 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 16 Oct 2011 19:38:50 +0200 Subject: [PATCH] skip errer detection in findline explorer Signed-off-by: Nico Schottelius --- conf/type/__addifnosuchline/explorer/findline | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/conf/type/__addifnosuchline/explorer/findline b/conf/type/__addifnosuchline/explorer/findline index c1633626..ac69a827 100755 --- a/conf/type/__addifnosuchline/explorer/findline +++ b/conf/type/__addifnosuchline/explorer/findline @@ -1,6 +1,7 @@ #!/bin/sh # # 2010-2011 Daniel Roth (dani-cdist@d-roth.li) +# 2011 Nico Schottelius (nico-cdist at schottelius.org) # # This file is part of cdist. # @@ -27,6 +28,9 @@ fi regex=$(cat "$__object/parameter/line") if [ -f "$file" ]; then + # sh -e is our environment, we know what we do, + # skip error detection for now + set +e grep -q "^$regex\$" "$file" if [ $? -eq 1 ]; then echo "NOTFOUND"