From 09ee18c27ed9a0e43a5baabe8ff985706ab8473f Mon Sep 17 00:00:00 2001 From: bin456789 Date: Tue, 27 Aug 2024 23:51:54 +0800 Subject: [PATCH] =?UTF-8?q?core:=20=E4=BF=AE=E5=A4=8D=E5=B0=8F=E6=A6=82?= =?UTF-8?q?=E7=8E=87=E5=88=B7=E6=96=B0=E5=88=86=E5=8C=BA=E6=97=B6=E6=8A=A5?= =?UTF-8?q?=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- trans.sh | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/trans.sh b/trans.sh index f2417b1..dcddc38 100644 --- a/trans.sh +++ b/trans.sh @@ -170,12 +170,19 @@ update_part() { fi # mdev - if rc-service --exists mdev && rc-service -q mdev status; then - # mdev 不会删除 /dev/disk/ 的旧分区,因此手动删除 - rm -rf /dev/disk/* - mdev -sf 2>/dev/null - rc-service mdev restart - fi + # mdev 不会删除 /dev/disk/ 的旧分区,因此手动删除 + # 如果 rm -rf 的时候刚好 mdev 在创建链接,rm -rf 会报错 Directory not empty + # 因此要先停止 mdev 服务 + # 还要删除 /dev/$xda*? + rc-service mdev stop + rm -rf /dev/disk/* + + # 没挂载 modloop 时会提示 + # modprobe: can't change directory to '/lib/modules': No such file or directory + # 因此强制不显示上面的提示 + mdev -sf 2>/dev/null + rc-service mdev start 2>/dev/null + sleep 1 } is_efi() {