dont fail just because grep in subshell exited non-zero

Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
remotes/origin/random_dot_cdist
Steven Armstrong 10 years ago
parent 39eb73a1d5
commit 28027f4261
  1. 2
      cdist/conf/type/__ssh_authorized_key/gencode-remote

@ -78,7 +78,7 @@ fi
# Determine the current state
entry="$(cat "$__object/files/should")"
state_should="$(cat "$__object/parameter/state")"
num_existing_entries=$(grep -c -F -x "$entry" "$__object/explorer/entry")
num_existing_entries=$(grep -c -F -x "$entry" "$__object/explorer/entry" || true)
if [ $num_existing_entries -eq 1 ]; then
state_is="present"
else

Loading…
Cancel
Save