Fix Persistence intermittently fails on Ubuntu 24.04 (#3718)
Ventoy CI / build (push) Canceled after 0s
Mirror GitHub to Gitee / Sync-GitHub-to-Gitee (push) Canceled after 0s

This commit is contained in:
longpanda
2026-08-06 12:51:19 +08:00
parent 021c237920
commit 6568972abc
3 changed files with 35 additions and 0 deletions
@@ -0,0 +1,19 @@
find_cow_device() {
tgt_pers_label="${1}"
vt_pers_label=""
vt_pers_dev=""
if [ -f /ventoy/ventoy_persistent_label -a -f /ventoy/ventoy_persistent_dev ]; then
vt_pers_label=$(cat /ventoy/ventoy_persistent_label)
vt_pers_dev=$(cat /ventoy/ventoy_persistent_dev)
fi
if [ "$tgt_pers_label" = "$vt_pers_label" ]; then
echo "$vt_pers_dev"
else
find_cow_device_back "$@"
fi
}
find_cow_device_back() {