diff --git a/debian/salsa-ci.yml b/debian/salsa-ci.yml index 43bf300..8e6803b 100644 --- a/debian/salsa-ci.yml +++ b/debian/salsa-ci.yml @@ -26,7 +26,7 @@ shellcheck: script: - apt-get update && apt-get upgrade -y - apt-get install -y shellcheck - - shellcheck -e SC1090,SC1091,SC2086,SC2154 -s dash $(find rootfs/etc/initramfs-tools -type f -executable | xargs grep -l '^#!/bin/sh') + - shellcheck -e SC1090,SC1091,SC2086 -s dash $(find rootfs/etc/initramfs-tools -type f -executable | xargs grep -l '^#!/bin/sh') build yamls: stage: build diff --git a/rootfs/etc/initramfs-tools/scripts/local-bottom/rpi-resizerootfs b/rootfs/etc/initramfs-tools/scripts/local-bottom/rpi-resizerootfs index 09bf36f..a426a3f 100755 --- a/rootfs/etc/initramfs-tools/scripts/local-bottom/rpi-resizerootfs +++ b/rootfs/etc/initramfs-tools/scripts/local-bottom/rpi-resizerootfs @@ -33,8 +33,8 @@ fi log_begin_msg "$0 resizing $ROOT" -# Unmount for safety -umount "${rootmnt}" +# Unmount for safety; fail if unset or empty (shellcheck SC2154) +umount "${rootmnt:?}" # Expand the partition size to fill the entire device parted -s $rootdev resizepart $rootpart_nr 100%