boot-tool: shellcheck lint fixes

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2022-02-22 17:28:34 +01:00
parent 95c28bfa78
commit bf10a73e5a

View File

@ -98,7 +98,7 @@ format() {
part_basename=$(basename "$bdev") part_basename=$(basename "$bdev")
if [ -z "$part_basename" ]; then if [ -z "$part_basename" ]; then
if [ $part != $bdev ]; then if [ "$part" != "$bdev" ]; then
symlinkmsg=" -> '$bdev'" symlinkmsg=" -> '$bdev'"
fi fi
warn "E: unable to determine basename of '$part'$symlinkmsg" warn "E: unable to determine basename of '$part'$symlinkmsg"
@ -162,7 +162,7 @@ init() {
else else
echo "Installing grub i386-pc target.." echo "Installing grub i386-pc target.."
grub-install.real \ grub-install.real \
--boot-directory $esp_mp \ --boot-directory "$esp_mp" \
--target i386-pc \ --target i386-pc \
--no-floppy \ --no-floppy \
--bootloader-id='proxmox' \ --bootloader-id='proxmox' \
@ -183,7 +183,7 @@ _clean_impl() {
warn 'E: /dev/disk/by-uuid does not exist, aborting!' warn 'E: /dev/disk/by-uuid does not exist, aborting!'
exit 1 exit 1
fi fi
echo -n "Checking whether ESP '$curr_uuid' exists.. " printf "Checking whether ESP '%s' exists.. " "$curr_uuid" # avoid newline
if [ -e "/dev/disk/by-uuid/$curr_uuid" ]; then if [ -e "/dev/disk/by-uuid/$curr_uuid" ]; then
echo "Found!" echo "Found!"
else else