Skip to content

Commit 1e60236

Browse files
committed
initrd/etc/functions: silence output of verify_checksums when no previous tree file exists to be compared against in diff
Signed-off-by: Thierry Laurion <[email protected]>
1 parent 1a8d685 commit 1e60236

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

initrd/etc/functions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1130,7 +1130,7 @@ verify_checksums() {
11301130
# which are interpreted by whiptail, less, ...
11311131
escape_zero "(new) " <"$TMP_TREE_FILE" >"${TMP_TREE_FILE}.user"
11321132
escape_zero "(new) " </tmp/tree_output >/tmp/tree_output.user
1133-
diff "${TMP_TREE_FILE}.user" /tmp/tree_output.user | grep -E '^\+\(new\).*$' | sed -r 's/^\+\(new\)/(new)/g' >>/tmp/hash_output
1133+
diff "${TMP_TREE_FILE}.user" /tmp/tree_output.user 2>/dev/null | grep -E '^\+\(new\).*$' | sed -r 's/^\+\(new\)/(new)/g' >>/tmp/hash_output
11341134
rm -f "${TMP_TREE_FILE}.user"
11351135
rm -f /tmp/tree_output.user
11361136
fi

0 commit comments

Comments
 (0)