From 50fbe33085dbe16ab47c4207f76eec09cec4535b Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Wed, 5 Jul 2017 10:12:06 +0200 Subject: [PATCH] New package: wpa_actiond-1.4 --- srcpkgs/wpa_actiond/files/wpa_actiond/run | 4 ++++ srcpkgs/wpa_actiond/files/wpa_log | 15 +++++++++++++++ srcpkgs/wpa_actiond/template | 20 ++++++++++++++++++++ 3 files changed, 39 insertions(+) create mode 100755 srcpkgs/wpa_actiond/files/wpa_actiond/run create mode 100755 srcpkgs/wpa_actiond/files/wpa_log create mode 100644 srcpkgs/wpa_actiond/template diff --git a/srcpkgs/wpa_actiond/files/wpa_actiond/run b/srcpkgs/wpa_actiond/files/wpa_actiond/run new file mode 100755 index 0000000000..69d40561cb --- /dev/null +++ b/srcpkgs/wpa_actiond/files/wpa_actiond/run @@ -0,0 +1,4 @@ +#!/bin/sh +[ -r ./conf ] && . ./conf +exec 2>&1 +exec wpa_actiond -a ${ACTION_FILE:=/usr/bin/wpa_log} -i ${WPA_INTERFACE:=wlan0} ${OPTS:=-n} diff --git a/srcpkgs/wpa_actiond/files/wpa_log b/srcpkgs/wpa_actiond/files/wpa_log new file mode 100755 index 0000000000..5b9fdd0cca --- /dev/null +++ b/srcpkgs/wpa_actiond/files/wpa_log @@ -0,0 +1,15 @@ +#!/bin/sh +set -e + +if [ "$(id -u)" -ne 0 ]; then + echo "$0 runs as root" + exit 1 +fi + +LOG_FILE=${LOG_FILE:=/var/log/wpa.log} + +if [ ! -f ${LOG_FILE} ]; then + echo "interface,ssid,id_str,event,epoch" > ${LOG_FILE} +fi + +echo "$1,$2,$3,$4,$(date +%s)" >> ${LOG_FILE} diff --git a/srcpkgs/wpa_actiond/template b/srcpkgs/wpa_actiond/template new file mode 100644 index 0000000000..555468a6f5 --- /dev/null +++ b/srcpkgs/wpa_actiond/template @@ -0,0 +1,20 @@ +# Template file for 'wpa_actiond' +pkgname=wpa_actiond +version=1.4 +revision=1 +build_style=gnu-makefile +hostmakedepends="" +makedepends="" +depends="wpa_supplicant" +short_desc="Daemon that connects to wpa_supplicant and handles connect and disconnect events" +maintainer="Andrea Brancaleoni " +license="GPL-2" +homepage="http://projects.archlinux.org/wpa_actiond.git/" +distfiles="https://sources.archlinux.org/other/wpa_actiond/${pkgname}-${version}.tar.xz" +checksum=e0e65e7c52a32796a0ff855ab18aa0b237d6b9afc87d4008c0380735abcb1a54 + +do_install() { + vbin wpa_actiond + vbin ${FILESDIR}/wpa_log + vsv wpa_actiond +}