Revert removal of internal wifi tool.
This commit is contained in:
parent
d32b31fec1
commit
9b999f35f5
2 changed files with 28 additions and 0 deletions
|
@ -20,6 +20,7 @@ makeinstall_target() {
|
|||
cp ${PKG_DIR}/sources/scripts/fancontrol ${INSTALL}/usr/bin
|
||||
cp ${PKG_DIR}/sources/scripts/headphone_sense ${INSTALL}/usr/bin
|
||||
cp ${PKG_DIR}/sources/scripts/system_utils ${INSTALL}/usr/bin
|
||||
cp ${PKG_DIR}/sources/scripts/internalwifi ${INSTALL}/usr/bin
|
||||
cp ${PKG_DIR}/sources/scripts/volume_sense ${INSTALL}/usr/bin
|
||||
if [ -d "${PKG_DIR}/sources/devices/${DEVICE}" ]
|
||||
then
|
||||
|
|
27
packages/sysutils/system-utils/sources/scripts/internalwifi
Executable file
27
packages/sysutils/system-utils/sources/scripts/internalwifi
Executable file
|
@ -0,0 +1,27 @@
|
|||
#!/bin/bash
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
|
||||
|
||||
. /etc/profile
|
||||
|
||||
if [ -z "${DEVICE_INTERNAL_WIFI}" ] || [ "${DEVICE_INTERNAL_WIFI}" = false ]
|
||||
then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
case $1 in
|
||||
disable)
|
||||
connmanctl disable wifi
|
||||
rmmod ${DEVICE_WIFI_MODULE}
|
||||
echo 0 >/sys/class/gpio/gpio${DEVICE_WIFI}/value
|
||||
set_setting internal.wifi 0
|
||||
;;
|
||||
enable)
|
||||
echo 1 >/sys/class/gpio/gpio${DEVICE_WIFI}/value
|
||||
modprobe ${DEVICE_WIFI_MODULE}
|
||||
connmanctl enable wifi
|
||||
set_setting internal.wifi 1
|
||||
;;
|
||||
esac
|
||||
|
||||
systemctl restart connman
|
Loading…
Reference in a new issue