Re: Allow user login and interaction before default runlevel finishes
Reply #2 –
(edit) I missed the README, the files are supposed to have a .start extension. Thanks for the advice!
Hello Lancia,
Thank you for your idea! By turning services into scripts, do you mean running wpa_supplicant and dhcpcd just as you would on the console? Although I get success messages, it appears to be as though the scripts never ran. On running dhcpcd again, it is "waiting for carrier" as it would when wpa_supplicant wasn't set up. On running the script after logging in, the script works as expected.
/etc/local.d/wifi.sh:
#!/bin/sh
{
count=0
wifi_if=wlan0
# wait for wlan0
while [[ $(ip a | grep $wifi_if | wc -l) == 0 ]] && [ $count -lt 30 ]
do
sleep 0.5
count=$((count+1))
done
wpa_supplicant -B -i $wifi_if -c /etc/wpa_supplicant/wpa_supplicant.conf
dhcpcd -b wlan0
} &> /log.txt &
/log.txt:
Successfully initialized wpa_supplicant
dhcpcd-9.4.1 starting
DUID 00:04:32:44:43:35:36:31:52:31:4b:4a:4a:52:36:31:44:35
forked to background, child pid 2312