Push wifi and networkservices into the background to improve startup time.

This commit is contained in:
fewtarius 2022-03-27 15:40:10 -04:00
parent 27bb337250
commit 54af42c0c7
No known key found for this signature in database
GPG key ID: F4AE55305D1B8C1A
2 changed files with 5 additions and 4 deletions

View file

@ -7,15 +7,16 @@
if [ "$(get_setting internal.wifi)" == 0 ] && [ "${DEVICE_INTERNAL_WIFI}" = true ]
then
rmmod ${DEVICE_WIFI_MODULE}
nohup rmmod ${DEVICE_WIFI_MODULE} &
exit 0
else
set_setting internal.wifi 1
fi
if [ "$(get_setting wifi.enabled)" == "0" ] || [ "$1" == "disable" ]
then
connmanctl disable wifi
nohup connmanctl disable wifi &
elif [ "$(get_setting wifi.enabled)" == "1" ] || [ "$1" == "enable" ]
then
connmanctl enable wifi
nohup connmanctl enable wifi &
fi

View file

@ -19,7 +19,7 @@ do
statemgr() {
for daemon in ${DAEMONS[@]}
do
systemctl ${1} ${daemon}
nohup systemctl ${1} ${daemon} &
done
}