mirror of
https://github.com/femtofox/femtofox.git
synced 2026-11-29 19:37:20 -05:00
run once and usb service fixes
I forgot to +x rc local and as a result found some issues
This commit is contained in:
parent
2e8a3f7136
commit
83a95e5c69
4 changed files with 14 additions and 9 deletions
0
foxbuntu/project/cfg/BoardConfig_IPC/overlay/overlay-luckfox-ubuntu/etc/rc.local
Normal file → Executable file
0
foxbuntu/project/cfg/BoardConfig_IPC/overlay/overlay-luckfox-ubuntu/etc/rc.local
Normal file → Executable file
|
|
@ -1,17 +1,16 @@
|
|||
[Unit]
|
||||
Description=Foxbuntu First Boot
|
||||
After=meshtasticd.service
|
||||
Requires=meshtasticd.service
|
||||
Before=serial-getty@ttyFIQ0.service
|
||||
DefaultDependencies=no
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/local/bin/femto-runonce.sh
|
||||
Type=oneshot
|
||||
RemainAfterExit=true
|
||||
Restart=no
|
||||
StandardOutput=journal+console
|
||||
StandardError=journal+console
|
||||
TTYPath=/dev/console
|
||||
|
||||
[Install]
|
||||
WantedBy=serial-getty@ttyFIQ0.service
|
||||
WantedBy=default.target
|
||||
|
||||
|
|
|
|||
|
|
@ -1,17 +1,16 @@
|
|||
[Unit]
|
||||
Description=Foxbuntu USB Configuration Tool
|
||||
After=femto-runonce.service meshtasticd.service
|
||||
After=meshtasticd.service
|
||||
Before=serial-getty@ttyFIQ0.service
|
||||
DefaultDependencies=no
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/local/bin/femto-usb-config-tool.sh
|
||||
Type=oneshot
|
||||
RemainAfterExit=true
|
||||
Restart=no
|
||||
StandardOutput=journal+console
|
||||
StandardError=journal+console
|
||||
TTYPath=/dev/console
|
||||
|
||||
[Install]
|
||||
WantedBy=serial-getty@ttyFIQ0.service
|
||||
WantedBy=default.target
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,12 @@ log_message() {
|
|||
echo "$(date +"%Y-%m-%d %H:%M:%S") $1" >> /tmp/femtofox-config.log
|
||||
}
|
||||
|
||||
if [ -e "/etc/.firstboot" ]; then
|
||||
echo "First boot, skipping USB Configuration Tool."
|
||||
logger "First boot, skipping USB Configuration Tool."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
exit_script() {
|
||||
if [ ! -z "$usb_path" ]; then #if usb path is populated
|
||||
if ! df -T /mnt/usb 2>/dev/null | grep -qw 'ntfs'; then
|
||||
|
|
@ -150,7 +156,8 @@ if [ -f "$mount_point/femtofox-config.txt" ]; then
|
|||
if [[ -n "$wifi_psk" ]]; then
|
||||
# Update the psk in the network block
|
||||
wifi_command="$wifi_command -p \"$wifi_psk\""
|
||||
log_message "Updating Wi-Fi PSK in wpa_supplicant.conf to \`$wifi_psk\`."
|
||||
#log_message "Updating Wi-Fi PSK in wpa_supplicant.conf to \`$wifi_psk\`."
|
||||
log_message "Updating Wi-Fi PSK in wpa_supplicant.conf to *HIDDEN*."
|
||||
found_config="true"
|
||||
update_wifi="true"
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue