iw: configure regulatory domain from .cache/regdomain.conf

Signed-off-by: Matthias Reichl <hias@horus.com>
This commit is contained in:
Matthias Reichl 2020-01-19 22:59:20 +01:00
parent 76a3dcb991
commit f7146be3ad
3 changed files with 14 additions and 0 deletions

View File

@ -14,3 +14,8 @@ PKG_LONGDESC="A new nl80211 based CLI configuration utility for wireless devices
pre_configure_target() {
export LDFLAGS="$LDFLAGS -pthread"
}
post_makeinstall_target() {
mkdir -p $INSTALL/usr/lib/iw
cp $PKG_DIR/scripts/setregdomain $INSTALL/usr/lib/iw
}

View File

@ -0,0 +1,8 @@
#!/bin/sh
REGDOMAIN=
REGDOMAIN_CONF="/storage/.cache/regdomain.conf"
[ -r "$REGDOMAIN_CONF" ] && . "$REGDOMAIN_CONF"
[ -z "$REGDOMAIN" ] && exit 0
exec /usr/sbin/iw reg set "$REGDOMAIN"

View File

@ -0,0 +1 @@
SUBSYSTEM=="ieee80211", ACTION=="add", RUN+="/usr/lib/iw/setregdomain"