From 1a1ca1794a7a3f123c6d19e20ffab23838b41735 Mon Sep 17 00:00:00 2001 From: CyberMind-FR Date: Thu, 19 Mar 2026 11:04:05 +0100 Subject: [PATCH] fix(droplet): Use awk for lowercase instead of buggy BusyBox tr BusyBox tr '[:upper:]' '[:lower:]' has a bug that converts 'p' to 'w', causing .zip to be detected as .ziw. Use awk tolower() instead. Co-Authored-By: Claude Opus 4.5 --- package/secubox/secubox-app-droplet/files/usr/sbin/dropletctl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/secubox/secubox-app-droplet/files/usr/sbin/dropletctl b/package/secubox/secubox-app-droplet/files/usr/sbin/dropletctl index ab79c9c0..c3d14a7f 100644 --- a/package/secubox/secubox-app-droplet/files/usr/sbin/dropletctl +++ b/package/secubox/secubox-app-droplet/files/usr/sbin/dropletctl @@ -75,8 +75,8 @@ cmd_publish() { log_info "Publishing: $file as $vhost" # Detect file type by extension (file command not available on OpenWrt) - # Strip any CR/LF that may come from Windows uploads or JSON parsing - local file_ext=$(echo "$file" | sed 's/.*\.//' | tr '[:upper:]' '[:lower:]' | tr -d '\r\n') + # Use awk for lowercase - BusyBox tr '[:upper:]' '[:lower:]' is buggy + local file_ext=$(echo "$file" | sed 's/.*\.//' | awk '{print tolower($0)}' | tr -d '\r\n') if [ "$file_ext" = "zip" ]; then log_info "Extracting ZIP..."