Skip to content
Snippets Groups Projects
Commit 21abd730 authored by andrew bezella's avatar andrew bezella
Browse files

match prior rm usage w/test and rm instead of rm -f

parent 3f1dabf3
Branches
Tags
1 merge request!58sys handler: remove old LUKS header backup file to allow updating
...@@ -600,7 +600,9 @@ if [ "$luksheaders" == "yes" ]; then ...@@ -600,7 +600,9 @@ if [ "$luksheaders" == "yes" ]; then
label=${dev#/dev/} label=${dev#/dev/}
label=${label//\//-} label=${label//\//-}
outputfile=${luksheadersfile//__star__/$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 will try to backup the LUKS header for device $dev"
debug "$CRYPTSETUP luksHeaderBackup \"${dev}\" --header-backup-file \"${outputfile}\"" debug "$CRYPTSETUP luksHeaderBackup \"${dev}\" --header-backup-file \"${outputfile}\""
output=`$CRYPTSETUP luksHeaderBackup "${dev}" --header-backup-file "${outputfile}" 2>&1` output=`$CRYPTSETUP luksHeaderBackup "${dev}" --header-backup-file "${outputfile}" 2>&1`
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment