From a2bc5dd7d889c7f0e8d31d24702be6a1324bc349 Mon Sep 17 00:00:00 2001 From: CyberMind-FR Date: Mon, 23 Feb 2026 09:48:39 +0100 Subject: [PATCH] fix(gk2hub): Use placeholder for empty TSV fields (BusyBox read compat) BusyBox ash's read command collapses consecutive tab delimiters, causing the protected field to end up in the wrong variable. Fix: Use "-" as placeholder for empty fields, then strip it when reading. Co-Authored-By: Claude Opus 4.5 --- .../secubox-app-gk2hub/files/usr/sbin/hub-generator | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/package/secubox/secubox-app-gk2hub/files/usr/sbin/hub-generator b/package/secubox/secubox-app-gk2hub/files/usr/sbin/hub-generator index 9e5ab4f6..46941939 100755 --- a/package/secubox/secubox-app-gk2hub/files/usr/sbin/hub-generator +++ b/package/secubox/secubox-app-gk2hub/files/usr/sbin/hub-generator @@ -185,10 +185,10 @@ uci show metablogizer 2>/dev/null | grep "=site$" | sed "s/metablogizer\.\(.*\)= cat=$(categorize_site "$name") emoji=$(get_emoji "$cat") echo "$cat" >> "$CAT_FILE" - # 7th field: protected (1 if auth_required) - protected="" + # 7th field: protected (use - placeholder for empty thumb to fix BusyBox read) + protected="-" [ "$auth_required" = "1" ] && protected="protected" - printf '%s\t%s\t%s\t%s\tmeta\t\t%s\n' "$domain" "$name" "$cat" "$emoji" "$protected" >> "$SITES_FILE" + printf '%s\t%s\t%s\t%s\tmeta\t-\t%s\n' "$domain" "$name" "$cat" "$emoji" "$protected" >> "$SITES_FILE" done # Streamlit instances @@ -201,7 +201,7 @@ uci show streamlit 2>/dev/null | grep "=instance$" | sed "s/streamlit\.\(.*\)=in cat=$(categorize_site "$name") emoji=$(get_emoji "$cat") echo "$cat" >> "$CAT_FILE" - printf '%s\t%s\t%s\t%s\tstreamlit\t\t\n' "$domain" "$name" "$cat" "$emoji" >> "$SITES_FILE" + printf '%s\t%s\t%s\t%s\tstreamlit\t-\t-\n' "$domain" "$name" "$cat" "$emoji" >> "$SITES_FILE" done # PeerTube videos @@ -308,6 +308,10 @@ echo '