From 07823423e5d14ead258d210f1cde186a5f76ab8a Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 20 Apr 2026 23:10:47 +0000 Subject: [PATCH] fix: use sudo test -s to verify extracted files in upgrade_kiosk On Ubuntu 22.04+, useradd creates home directories with 750 permissions, so the non-root user running the script cannot traverse /home/kiosk to check file existence with [[ -s ]]. sudo tee (running as root) writes the files successfully, but the bash test always returned false, falsely reporting all extractions as failed. Switch to `sudo test -s` to match the pattern already used elsewhere in the script (line ~10320) when checking files under /home/kiosk. https://claude.ai/code/session_01M3tiofbGfmTddeMcXr8nXr --- ubuntu-based-kiosk-v0.9.9.1.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ubuntu-based-kiosk-v0.9.9.1.sh b/ubuntu-based-kiosk-v0.9.9.1.sh index d4f10f3..2fe67de 100644 --- a/ubuntu-based-kiosk-v0.9.9.1.sh +++ b/ubuntu-based-kiosk-v0.9.9.1.sh @@ -10823,7 +10823,7 @@ upgrade_kiosk() { # Extract content and write to file (use sudo tee for reliability) sed -n "${content_start},${content_end}p" "$script_path" | sudo tee "$output_file" > /dev/null - if [[ -s "$output_file" ]]; then + if sudo test -s "$output_file"; then echo " ✓ $fname (lines $content_start-$content_end)" return 0 else