HankB / Linux_ZFS_Root

Commands/script to install Linux on ZFS root
10 stars 6 forks source link

shellcheck warnings on script run within chroot #20

Open HankB opened 3 years ago

HankB commented 3 years ago
hbarta@olive:~/Programming/Linux_ZFS_Root/Debian$ shellcheck chroot_commands.sh

In chroot_commands.sh line 24:
    echo luks1 UUID=$(blkid -s UUID -o value         "$ROOT_PART") none         luks,discard,initramfs > /etc/crypttab
                    ^-- SC2046: Quote this to prevent word splitting.

In chroot_commands.sh line 32:
    mkdosfs -F 32 -s 1 -n EFI ${EFI_PART}
                              ^-- SC2086: Double quote to prevent globbing and word splitting.

In chroot_commands.sh line 40:
    echo ${EFI_PART}         /boot/efi vfat nofail,x-systemd.device-timeout=1 0 1 >> /etc/fstab
         ^-- SC2086: Double quote to prevent globbing and word splitting.

In chroot_commands.sh line 87:
if ! [ `grub-probe /boot` == "zfs" ];then
       ^-- SC2046: Quote this to prevent word splitting.
       ^-- SC2006: Use $(..) instead of legacy `..`.

hbarta@olive:~/Programming/Linux_ZFS_Root/Debian$ 

I started working with these and wound up introducing some kind of subtle bug that caused /boot/efi to not mount and that resulted in a failure to install grub. It was at that point that I decided more time spent on this (requiring nearly complete installation for each try) was not worth the time. If someone else would like to work on this I would gladly accept PRs.