diff --git a/handlers/sys.in b/handlers/sys.in index ca6470fd6a73d3c87362aba98053091bfbb54a9d..757c0e4a8ec0aaaae122e5d05ca274c34170d9de 100644 --- a/handlers/sys.in +++ b/handlers/sys.in @@ -600,7 +600,9 @@ if [ "$luksheaders" == "yes" ]; then label=${dev#/dev/} label=${label//\//-} outputfile=${luksheadersfile//__star__/$label} - rm -f "${outputfile}" + if [ -f "${outputfile}" ]; then + rm "${outputfile}" + fi debug "$CRYPTSETUP will try to backup the LUKS header for device $dev" debug "$CRYPTSETUP luksHeaderBackup \"${dev}\" --header-backup-file \"${outputfile}\"" output=`$CRYPTSETUP luksHeaderBackup "${dev}" --header-backup-file "${outputfile}" 2>&1`