added ntfs support, read only

This commit is contained in:
nagumii 2024-11-22 14:48:41 +02:00
parent a75589c4f1
commit 1b3bfd7c28

View file

@ -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