diff --git a/cdist/conf/type/__line/gencode-remote b/cdist/conf/type/__line/gencode-remote
index 1ac1ad13..f73444e3 100755
--- a/cdist/conf/type/__line/gencode-remote
+++ b/cdist/conf/type/__line/gencode-remote
@@ -80,7 +80,7 @@ tmpfile=\$(mktemp ${file}.cdist.XXXXXXXXXX)
 if [ -f "$file" ]; then
    cp -p "$file" "\$tmpfile"
 fi
-grep -v $greparg '$regex' '$file' > \$tmpfile
+grep -v $greparg '$regex' '$file' > \$tmpfile || true
 mv -f "\$tmpfile" "$file"
 eof
     ;;