From 1b3bfd7c28ca7d59dd6110e1a474b38a2335f899 Mon Sep 17 00:00:00 2001 From: nagumii Date: Fri, 22 Nov 2024 14:48:41 +0200 Subject: [PATCH] added ntfs support, read only --- scripts/usbconfig.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/scripts/usbconfig.sh b/scripts/usbconfig.sh index 0a12095..5e71507 100644 --- a/scripts/usbconfig.sh +++ b/scripts/usbconfig.sh @@ -62,16 +62,15 @@ else fi fi + WPA_SUPPLICANT_CONF="/etc/wpa_supplicant/wpa_supplicant.conf" + USB_CONFIG="/tmp/femtofox-config.txt" + # Check if the mounted USB drive contains a file femtofox-config.txt if [ -f "$MOUNT_POINT/femtofox-config.txt" ]; then log_message "femtofox-config.txt found on USB drive." # Remove Windows-style carriage returns - tr -d '\r' < "$MOUNT_POINT/femtofox-config.txt" > "$MOUNT_POINT/femtofox-config.txt.tmp" - mv "$MOUNT_POINT/femtofox-config.txt.tmp" "$MOUNT_POINT/femtofox-config.txt" - - WPA_SUPPLICANT_CONF="/etc/wpa_supplicant/wpa_supplicant.conf" - USB_CONFIG="$MOUNT_POINT/femtofox-config.txt" + tr -d '\r' < "$MOUNT_POINT/femtofox-config.txt" > $USB_CONFIG # Initialize variables SSID="" @@ -127,6 +126,8 @@ if [ -f "$MOUNT_POINT/femtofox-config.txt" ]; then done fi + rm $USB_CONFIG + else log_message "USB drive mounted but femtofox-config.txt not found, ignoring." for _ in {1..3}; do