wpa_supplicant fix
This commit is contained in:
1 parent
88d70601e1
commit
b05cb8b909
2 files changed
+56
-3
No files matched your search
@@ -0,0 +1,40 @@
|
||||
#!/bin/sh
|
||||
# Script for using udhcpc (started by ifup) with wpa_supplicant.
|
||||
#
|
||||
# Distributed under the same license as wpa_supplicant itself.
|
||||
# Copyright (c) 2015,2018 Sören Tempel <soeren+alpine@soeren-tempel.net>
|
||||
|
||||
if [ $# -ne 2 ]; then
|
||||
logger -t wpa_cli "this script should be called from wpa_cli(8)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
IFNAME="${1}"
|
||||
ACTION="${2}"
|
||||
SIGNAL=""
|
||||
DHCPID=""
|
||||
|
||||
# PID file created by the busybox ifup applet for udhcpc.
|
||||
DHCPIDFILE="/var/run/udhcpc.${IFNAME}.pid"
|
||||
|
||||
if [ ! -e "${DHCPIDFILE}" ]; then
|
||||
logger -t wpa_cli "udhcpc isn't running for interface '${IFNAME}'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
logger -t wpa_cli "interface ${IFNAME} ${ACTION}"
|
||||
case "${ACTION}" in
|
||||
CONNECTED)
|
||||
SIGNAL="USR1"
|
||||
;;
|
||||
DISCONNECTED)
|
||||
SIGNAL="USR2"
|
||||
;;
|
||||
*)
|
||||
logger -t wpa_cli "unknown action '${ACTION}'"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
read -r DHCPID < "${DHCPIDFILE}"
|
||||
kill -${SIGNAL} "${DHCPID}" || logger -t wpa_cli \
|
||||
"Couldn't send '${SIGNAL}' to '${DHCPID}'"
|
||||
@@ -11,6 +11,7 @@ source=('https://w1.fi/releases/wpa_supplicant-2.10.tar.gz'
|
||||
'config'
|
||||
'wpa_supplicant.initd'
|
||||
'wpa_supplicant.confd'
|
||||
'wpa_cli.sh'
|
||||
)
|
||||
depends=(dbus libnl openssl pcsc-lite readline)
|
||||
makedepends=()
|
||||
@@ -18,6 +19,7 @@ md5sums=('d26797fcb002898d4ee989179346e1cc'
|
||||
'SKIP'
|
||||
'SKIP'
|
||||
'SKIP'
|
||||
'SKIP'
|
||||
)
|
||||
group=(net.wireless)
|
||||
uses=()
|
||||
@@ -25,8 +27,8 @@ arch=('x86_64')
|
||||
|
||||
cd $name-$version/$name
|
||||
|
||||
export BINDIR=/usr/sbin
|
||||
export LIBDIR=/usr/lib
|
||||
export BINDIR=/sbin
|
||||
export LIBDIR=/lib64
|
||||
|
||||
setup(){
|
||||
cat ../../config > .config
|
||||
@@ -34,12 +36,23 @@ setup(){
|
||||
|
||||
build(){
|
||||
make $jobs
|
||||
make $jobs eapol_test
|
||||
}
|
||||
|
||||
package(){
|
||||
make install $jobs
|
||||
install -Dm644 ./wpa_supplicant.conf $DESTDIR/etc/wpa_supplicant.conf
|
||||
# config
|
||||
install -Dm644 ./wpa_supplicant.conf $DESTDIR/etc/wpa_supplicant/wpa_supplicant-example.conf
|
||||
echo "" > $DESTDIR/etc/wpa_supplicant/wpa_supplicant.conf
|
||||
# openrc
|
||||
install -Dm755 ../../wpa_supplicant.initd $DESTDIR/etc/init.d/wpa_supplicant
|
||||
install -Dm755 ../../wpa_supplicant.confd $DESTDIR/etc/conf.d/wpa_supplicant
|
||||
# stuff
|
||||
install -Dm755 ./eapol_test $DESTDIR/sbin/eapol_test
|
||||
install -Dm755 ../..//wpa_cli.sh $DESTDIR/etc/wpa_supplicant/wpa_cli.sh
|
||||
|
||||
# dbus
|
||||
install -Dm644 ./dbus/dbus-wpa_supplicant.conf $DESTDIR/usr/share/dbus-1/system.d/wpa_supplicant.conf
|
||||
install -Dm644 ./dbus/fi.w1.wpa_supplicant1.service -t $DESTDIR/usr/share/dbus-1/system-services
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user