diff --git a/scripts/luckfox-install.sh b/scripts/luckfox-install.sh index 56ac743..27aaa5d 100644 --- a/scripts/luckfox-install.sh +++ b/scripts/luckfox-install.sh @@ -1,8 +1,12 @@ echo "*** $(date "+%H:%M:%S %Z"): Starting Femtofox install script ***\e[0m\n" -read -p "Enter your SSID: " SSID -read -sp "Enter your password: " PASSWORD -echo +read -p "Enter wifi SSID: " SSID +echo -n "Enter wifi password: " +stty -echo # Disable terminal echo +read PASSWORD +stty echo # Re-enable terminal echo +echo "*** SSID saved. Wifi requires adapter ***\e[0m\n" + sudo mount -t tmpfs tmpfs /run -o remount,size=32M,nosuid,noexec,relatime,mode=755 #Embiggen tmpfs - prevents problems. sudo sh -c 'echo "tmpfs /run tmpfs size=32M,nosuid,noexec,relatime,mode=755 0 0" >> /etc/fstab' #Embiggen tmpfs - for future boots. diff --git a/scripts/networkinterfaces.sh b/scripts/networkinterfaces.sh deleted file mode 100644 index 69037e6..0000000 --- a/scripts/networkinterfaces.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -# Get the current MAC address for eth0 -current_mac=$(cat /sys/class/net/eth0/address) - -# Define the configuration string to replace -config="# interfaces(5) file used by ifup(8) and ifdown(8) -# Include files from /etc/network/interfaces.d: -source /etc/network/interfaces.d/* - -auto lo -iface lo inet loopback - -# static mac address for onboard ethernet (castellated pins) -allow-hotplug eth0 -iface eth0 inet dhcp -hwaddress ether $current_mac - -allow-hotplug wlan0 -iface wlan0 inet dhcp - wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf -" - -# Replace the existing configuration for eth0 in /etc/network/interfaces -sudo sed -i "/iface eth0 inet/d" /etc/network/interfaces -echo "$config" | sudo tee /etc/network/interfaces > /dev/null - -# Output the current MAC address -echo "*** Replaced /etc/network/interfaces with new MAC address ($current_mac) and wifi support ***\e[0m"