1 Star 0 Fork 16

gaohongmei/dracut

forked from src-anolis-os/dracut 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0164.patch 906 Bytes
一键复制 编辑 原始数据 按行查看 历史
From 1fd29d8550d7d1573b2d2a60b41d6a5f3ca5003f Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Fri, 12 Feb 2021 13:26:14 +0100
Subject: [PATCH] fix: shellcheck for modules.d/99squash/clear-squash.sh
(cherry picked from commit 73f5cc7c3754f9561abe948b4b080a84b34c7d1a)
Resolves: #1959336
---
modules.d/99squash/clear-squash.sh | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/modules.d/99squash/clear-squash.sh b/modules.d/99squash/clear-squash.sh
index 34cb4cf5..1d626f98 100755
--- a/modules.d/99squash/clear-squash.sh
+++ b/modules.d/99squash/clear-squash.sh
@@ -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[@]}"
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/gaohongmei/dracut.git
git@gitee.com:gaohongmei/dracut.git
gaohongmei
dracut
dracut
a8

搜索帮助