From 202e5789f3ea14b894c8fa53bf054694509b09fd Mon Sep 17 00:00:00 2001 From: Ward from fusion-voyager-3 Date: Thu, 19 Dec 2024 17:49:50 +0300 Subject: [PATCH] Fix non ventoy pickup --- .github/release-nest-v3 | 2 +- pika-live-booster-hooks/debian/changelog | 2 +- .../usr/share/booster/hooks-early/01_pika_live.sh | 14 ++++++++++++-- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/release-nest-v3 b/.github/release-nest-v3 index bf0d87a..7813681 100644 --- a/.github/release-nest-v3 +++ b/.github/release-nest-v3 @@ -1 +1 @@ -4 \ No newline at end of file +5 \ No newline at end of file diff --git a/pika-live-booster-hooks/debian/changelog b/pika-live-booster-hooks/debian/changelog index d253999..f6e3d6f 100644 --- a/pika-live-booster-hooks/debian/changelog +++ b/pika-live-booster-hooks/debian/changelog @@ -1,4 +1,4 @@ -pika-live-booster-hooks (1.0-101pika3) pika; urgency=medium +pika-live-booster-hooks (1.0-101pika4) pika; urgency=medium * Initial release. diff --git a/pika-live-booster-hooks/usr/share/booster/hooks-early/01_pika_live.sh b/pika-live-booster-hooks/usr/share/booster/hooks-early/01_pika_live.sh index 44bada4..ee73e51 100755 --- a/pika-live-booster-hooks/usr/share/booster/hooks-early/01_pika_live.sh +++ b/pika-live-booster-hooks/usr/share/booster/hooks-early/01_pika_live.sh @@ -40,7 +40,17 @@ if [ "$QUIET_MODE" = false ] then busybox echo '[PikaOS Booster Live Hook]: Searching for Live medium...' fi -LIVE_MEDIA="$(busybox blkid | busybox grep "PikaOS 4" | busybox grep "iso9660" | busybox head -n1 | busybox awk -F: '{print $1}')" +LIVE_MEDIA="$(busybox blkid | busybox grep "$ISO_LABEL_NAME_PARAM" | busybox grep "iso9660" | busybox head -n1 | busybox awk -F: '{print $1}')" +while [ -z "$LIVE_MEDIA" ] +do + if [ "$QUIET_MODE" = false ] + then + busybox echo '[PikaOS Booster Live Hook]: Live medium could not be found retrying...' + fi + LIVE_MEDIA="$(busybox blkid | busybox grep "$ISO_LABEL_NAME_PARAM" | busybox grep "iso9660" | busybox head -n1 | busybox awk -F: '{print $1}')" + ((c++)) && ((c==10)) && break + busybox sleep 5 +done if [ -z "$LIVE_MEDIA" ] then @@ -60,7 +70,7 @@ then do if [ "$QUIET_MODE" = false ] then - busybox echo '[PikaOS Booster Live Hook]: Ventoy Device not found retrying...' + busybox echo '[PikaOS Booster Live Hook]: Ventoy Device could not found retrying...' fi VENTOY_DEVICE="$(busybox blkid | busybox grep "Ventoy" | busybox head -n1 | busybox awk -F: '{print $1}')" ((c++)) && ((c==10)) && break