core: 暴力刷新分区

This commit is contained in:
bin456789 2023-12-13 21:56:37 +08:00
parent 11784f13cc
commit 84948db5d3
No known key found for this signature in database
GPG Key ID: EE301B386DE6C11B

View File

@ -105,23 +105,29 @@ download() {
} }
update_part() { update_part() {
# partx sleep 1
# https://access.redhat.com/solutions/199573
if is_have_cmd partx; then
partx -u $1
fi
if rc-service --exists udev && rc-service udev status; then # 玄学
# udev for i in 1 2 3; do
udevadm trigger sync
udevadm settle partprobe /dev/$xda 2>/dev/null
else
# busybox mdev # partx
# 得刷新多次,不然找不到新分区 # https://access.redhat.com/solutions/199573
# -f 好像没用,而且 3.16 没有 if is_have_cmd partx; then
mdev -s 2>/dev/null partx -u $1
mdev -s 2>/dev/null fi
fi
if rc-service --exists udev && rc-service -q udev status; then
# udev
udevadm trigger
udevadm settle
else
# busybox mdev
# -f 好像没用,而且 3.16 没有
mdev -s 2>/dev/null
fi
done
} }
is_efi() { is_efi() {