Skip to content

shellcheck warnings on script run within chroot #20

Description

@HankB
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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is neededwontfixThis will not be worked on

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions