main/wpa_supplicant: use supervise-daemon

This commit is contained in:
Leo 2019-08-26 14:29:16 -03:00 committed by Natanael Copa
parent ea2d0c08d7
commit 83fd25f7db
3 changed files with 20 additions and 18 deletions

View File

@ -2,14 +2,14 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=wpa_supplicant
pkgver=2.9
pkgrel=3
pkgrel=4
pkgdesc="A utility providing key negotiation for WPA wireless networks"
url="https://w1.fi/wpa_supplicant/"
arch="all"
license="BSD-3-Clause"
subpackages="$pkgname-doc $pkgname-openrc"
makedepends="linux-headers openssl-dev dbus-dev libnl3-dev pcsc-lite-dev"
source="https://w1.fi/releases/$pkgname-$pkgver.tar.gz
source="https://w1.fi/releases/wpa_supplicant-$pkgver.tar.gz
wpa_supplicant.initd
wpa_supplicant.confd
@ -110,10 +110,10 @@ package() {
}
sha512sums="37a33f22cab9d27084fbef29856eaea0f692ff339c5b38bd32402dccf293cb849afd4a870cd3b5ca78179f0102f4011ce2f3444a53dc41dc75a5863b0a2226c8 wpa_supplicant-2.9.tar.gz
18fde087bfe53d092ab39e7db5cea59125ce3a7a15937e0113d2e7e5a7935e29e063b24f92fd162fb8e17b69044302c190ae3c4cc0aa8dcbc869f4364e063688 wpa_supplicant.initd
2be5eca8be4c1c7bc70f718d4bc122488ffe08360496b5af91014366f2d1ef34e2ad9724b8b8c476209b47ededdfb807e2aa6a04a200ed827d4c8cfbee9e04a7 wpa_supplicant.initd
24bc4d46f3a8923890f233e433928c3f1204ab5f15a1c32b21dca220af89e2474026059e1040834db88cd3d8f6b61c46abb5cf18bda906e78dcd8fccd0f2a382 wpa_supplicant.confd
c3db077fa78dd296d90d07626cb4e684f87618a77ffd51c1ae04b47be7bc0db1e9a3e0f7442acef21c081f6bb782f150cbbd3d0bf245d6ab43f19da3899b53b9 wpa_cli.confd
a0ac905ef23af18f1899a797e18157a54fa509c7cc3c59583de768a493d750876bbc0a89237373b67171e7c84259d2350d2c0e33d8e1ea56db9a2e5f27b64128 wpa_cli.initd
b63dcf28c5a4be36b8a3c08c93967122f9001f7fc825940aa78746666d000ccda3038e0226bd5771d37b3bbc8ad617d9ac9c766003173b052bf0d974188898ca wpa_cli.initd
2be055dd1f7da5a3d8e79c2f2c0220ddd31df309452da18f290144d2112d6dbde0fc633bb2ad02c386a39d7785323acaf5f70e5969995a1e8303a094eb5fe232 eloop.patch
6707991f9a071f2fcb09d164d31d12b1f52b91fbb5574b70b8d6f9727f72bbe42b03dd66d10fcc2126f5b7e49ac785657dec90e88b4bf54a9aa5638582f6e505 config
212c4265afce2e72b95a32cd785612d6c3e821b47101ead154136d184ac4add01434ada6c87edbb9a98496552e76e1a4d79c6b5840e3a5cfe5e6d602fceae576 wpa_cli.sh"

10
main/wpa_supplicant/wpa_cli.initd Executable file → Normal file
View File

@ -1,8 +1,12 @@
#!/sbin/openrc-run
command="/sbin/wpa_cli"
pidfile="/var/run/${SVCNAME}.pid"
command_args="${WPACLI_OPTS} -B -P ${pidfile} >/dev/null"
supervisor=supervise-daemon
name="WPA Command Line Client"
description="Text-based frontend for interacting with WPA Supplicant"
command=/sbin/wpa_cli
command_args="${WPACLI_OPTS} >/dev/null"
depend() {
need wpa_supplicant

View File

@ -1,17 +1,18 @@
#!/sbin/openrc-run
# Copyright (c) 2009 Roy Marples <roy@marples.name>
# All rights reserved. Released under the 2-clause BSD license.
supervisor=supervise-daemon
name="WPA Supplicant"
description="Wi-Fi Protected Access client and IEEE 802.1X supplicant"
command=/sbin/wpa_supplicant
default_conf=/etc/wpa_supplicant/wpa_supplicant.conf
wpa_supplicant_if=${wpa_supplicant_if:+-i}$wpa_supplicant_if
command_args="$wpa_supplicant_args -B $wpa_supplicant_if"
name="WPA Supplicant Daemon"
command_args="$wpa_supplicant_args $wpa_supplicant_if"
default_conf=/etc/wpa_supplicant/wpa_supplicant.conf
depend()
{
depend() {
need localmount
use logger dbus
after bootmisc modules entropy udev-settle
@ -19,8 +20,7 @@ depend()
keyword -shutdown
}
find_wireless()
{
find_wireless() {
local iface=
for iface in /sys/class/net/*; do
if [ -e "$iface"/wireless -o -e "$iface"/phy80211 ]; then
@ -32,8 +32,7 @@ find_wireless()
return 1
}
append_wireless()
{
append_wireless() {
local iface= i=
iface=$(find_wireless)
@ -46,8 +45,7 @@ append_wireless()
fi
}
start_pre()
{
start_pre() {
case " $command_args" in
*" -i"*) ;;
*) append_wireless;;