]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
fix: shellcheck for modules.d/99squash/clear-squash.sh
authorHarald Hoyer <harald@redhat.com>
Fri, 12 Feb 2021 12:26:14 +0000 (13:26 +0100)
committerHarald Hoyer <harald@hoyer.xyz>
Mon, 15 Feb 2021 10:00:37 +0000 (11:00 +0100)
modules.d/99squash/clear-squash.sh

index 34cb4cf5c65cde7239fb072aa2f5bd4f5dd7ed30..1d626f9823a569ff7fbfc0b49fc8306121753609 100755 (executable)
@@ -1,9 +1,6 @@
-#!/bin/sh
+#!/bin/bash
 SQUASH_MNT_REC=/squash/mounts
-SQUASH_MNTS=( )
 
-while read mnt; do
-    SQUASH_MNTS+=( "$mnt" )
-done <<< "$(cat $SQUASH_MNT_REC)"
+mapfile -t SQUASH_MNTS < $SQUASH_MNT_REC
 
-umount --lazy -- ${SQUASH_MNTS[@]}
+umount --lazy -- "${SQUASH_MNTS[@]}"