9f65cc
From 1fd29d8550d7d1573b2d2a60b41d6a5f3ca5003f Mon Sep 17 00:00:00 2001
9f65cc
From: Harald Hoyer <harald@redhat.com>
9f65cc
Date: Fri, 12 Feb 2021 13:26:14 +0100
9f65cc
Subject: [PATCH] fix: shellcheck for modules.d/99squash/clear-squash.sh
9f65cc
9f65cc
(cherry picked from commit 73f5cc7c3754f9561abe948b4b080a84b34c7d1a)
9f65cc
9f65cc
Resolves: #1959336
9f65cc
---
9f65cc
 modules.d/99squash/clear-squash.sh | 9 +++------
9f65cc
 1 file changed, 3 insertions(+), 6 deletions(-)
9f65cc
9f65cc
diff --git a/modules.d/99squash/clear-squash.sh b/modules.d/99squash/clear-squash.sh
9f65cc
index 34cb4cf5..1d626f98 100755
9f65cc
--- a/modules.d/99squash/clear-squash.sh
9f65cc
+++ b/modules.d/99squash/clear-squash.sh
9f65cc
@@ -1,9 +1,6 @@
9f65cc
-#!/bin/sh
9f65cc
+#!/bin/bash
9f65cc
 SQUASH_MNT_REC=/squash/mounts
9f65cc
-SQUASH_MNTS=( )
9f65cc
 
9f65cc
-while read mnt; do
9f65cc
-    SQUASH_MNTS+=( "$mnt" )
9f65cc
-done <<< "$(cat $SQUASH_MNT_REC)"
9f65cc
+mapfile -t SQUASH_MNTS < $SQUASH_MNT_REC
9f65cc
 
9f65cc
-umount --lazy -- ${SQUASH_MNTS[@]}
9f65cc
+umount --lazy -- "${SQUASH_MNTS[@]}"
9f65cc