skip errer detection in findline explorer

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-10-16 19:38:50 +02:00
parent 4849149af5
commit 1e4de3521a

View file

@ -1,6 +1,7 @@
#!/bin/sh #!/bin/sh
# #
# 2010-2011 Daniel Roth (dani-cdist@d-roth.li) # 2010-2011 Daniel Roth (dani-cdist@d-roth.li)
# 2011 Nico Schottelius (nico-cdist at schottelius.org)
# #
# This file is part of cdist. # This file is part of cdist.
# #
@ -27,6 +28,9 @@ fi
regex=$(cat "$__object/parameter/line") regex=$(cat "$__object/parameter/line")
if [ -f "$file" ]; then 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" grep -q "^$regex\$" "$file"
if [ $? -eq 1 ]; then if [ $? -eq 1 ]; then
echo "NOTFOUND" echo "NOTFOUND"