From 9ebe26ccbb98ed0992da3a8231b7c17f81601a5a Mon Sep 17 00:00:00 2001 From: bin456789 Date: Tue, 20 Aug 2024 00:28:01 +0800 Subject: [PATCH] =?UTF-8?q?core:=20=E5=85=88=E6=A3=80=E6=9F=A5=20modloop?= =?UTF-8?q?=20=E6=98=AF=E5=90=A6=E6=AD=A3=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关联 #136 --- trans.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/trans.sh b/trans.sh index acaf18f..70b9dc9 100644 --- a/trans.sh +++ b/trans.sh @@ -309,6 +309,14 @@ extract_env_from_cmdline() { done } +ensure_modloop_started() { + if ! rc-service modloop status; then + if ! retry 5 rc-service modloop start; then + error_and_exit "modloop failed to start." + fi + fi +} + mod_motd() { # 安装后 alpine 后要恢复默认 # 自动安装失败后,可能手动安装 alpine,因此无需判断 $distro @@ -3996,6 +4004,12 @@ EOF trans() { mod_motd + + # 先检查 modloop 是否正常 + # 防止格式化硬盘后,缺少 ext4 模块导致 mount 失败 + # https://github.com/bin456789/reinstall/issues/136 + ensure_modloop_started + cat /proc/cmdline clear_previous add_community_repo