From 83d65cfac88aeec5c6bbc99476c4e446bda9c1dd Mon Sep 17 00:00:00 2001 From: Juergen Daubert Date: Fri, 11 Oct 2019 14:01:19 +0200 Subject: [PATCH] iwd: moved from contrib to opt, update to 0.22 --- iwd/.footprint | 25 ++++++++++++++++++++++++ iwd/.signature | 6 ++++++ iwd/Pkgfile | 29 +++++++++++++++++++++++++++ iwd/README | 9 +++++++++ iwd/iwd | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 122 insertions(+) create mode 100644 iwd/.footprint create mode 100644 iwd/.signature create mode 100644 iwd/Pkgfile create mode 100644 iwd/README create mode 100755 iwd/iwd diff --git a/iwd/.footprint b/iwd/.footprint new file mode 100644 index 000000000..56bf710df --- /dev/null +++ b/iwd/.footprint @@ -0,0 +1,25 @@ +drwxr-xr-x root/root etc/ +drwx------ root/root etc/iwd/ +drwxr-xr-x root/root etc/rc.d/ +-rwxr-xr-x root/root etc/rc.d/iwd +drwxr-xr-x root/root usr/ +drwxr-xr-x root/root usr/bin/ +-rwxr-xr-x root/root usr/bin/iwctl +-rwxr-xr-x root/root usr/bin/iwmon +drwxr-xr-x root/root usr/sbin/ +-rwxr-xr-x root/root usr/sbin/iwd +drwxr-xr-x root/root usr/share/ +drwxr-xr-x root/root usr/share/dbus-1/ +drwxr-xr-x root/root usr/share/dbus-1/system.d/ +-rw-r--r-- root/root usr/share/dbus-1/system.d/iwd-dbus.conf +drwxr-xr-x root/root usr/share/man/ +drwxr-xr-x root/root usr/share/man/man1/ +-rw-r--r-- root/root usr/share/man/man1/iwctl.1.gz +-rw-r--r-- root/root usr/share/man/man1/iwmon.1.gz +drwxr-xr-x root/root usr/share/man/man5/ +-rw-r--r-- root/root usr/share/man/man5/iwd.conf.5.gz +drwxr-xr-x root/root usr/share/man/man8/ +-rw-r--r-- root/root usr/share/man/man8/iwd.8.gz +drwxr-xr-x root/root var/ +drwxr-xr-x root/root var/lib/ +drwx------ root/root var/lib/iwd/ diff --git a/iwd/.signature b/iwd/.signature new file mode 100644 index 000000000..34a4fd04a --- /dev/null +++ b/iwd/.signature @@ -0,0 +1,6 @@ +untrusted comment: verify with /etc/ports/opt.pub +RWSE3ohX2g5d/aVw3Wvv7RWvawjJnlJZWRGqwvpZaskPzkVyhltGhnhCvMTYsV3pvi2Nx0tlNzKNj5gZZbIXCCLOCNGleQn+IQA= +SHA256 (Pkgfile) = d140e93c59f3b6c5e46541e9531844c287e895454b12e490d147853e5c706504 +SHA256 (.footprint) = c6617f1b95f78775398a8334a23e78f41490e196fdb5953c6aaf986b9918ea80 +SHA256 (iwd-0.22.tar.xz) = b50c778716a2a1f9da961de0cac4711ad43ab104a67405935248f33ea8a6559a +SHA256 (iwd) = f0eaab15666fed402e984ff12a923ce857a4985ab2e6e00c8da35fecb81c219e diff --git a/iwd/Pkgfile b/iwd/Pkgfile new file mode 100644 index 000000000..a1c560a63 --- /dev/null +++ b/iwd/Pkgfile @@ -0,0 +1,29 @@ +# Description: Wireless daemon for Linux +# URL: https://iwd.wiki.kernel.org/ +# Maintainer: Juergen Daubert, jue at crux dot nu +# Depends on: readline dbus + +name=iwd +version=0.22 +release=1 +source=(https://www.kernel.org/pub/linux/network/wireless/$name-$version.tar.xz + iwd) + +build() { + cd $name-$version + + ./configure --prefix=/usr \ + --libexecdir=/usr/sbin \ + --localstatedir=/var \ + --sysconfdir=/etc \ + --disable-systemd-service + + make + make DESTDIR=$PKG install + + install -d -m 0700 $PKG/var/lib/iwd + install -d -m 0700 $PKG/etc/iwd + + # rc script + install -D -m 0755 $SRC/iwd $PKG/etc/rc.d/iwd +} diff --git a/iwd/README b/iwd/README new file mode 100644 index 000000000..c60cff7dd --- /dev/null +++ b/iwd/README @@ -0,0 +1,9 @@ +README for iwd + +REQUIREMENTS + iwd uses Linux Kernel's crypto subsystem for all + cryptographic operations. Therefore several kernel + options are needed to run iwd. + See https://iwd.wiki.kernel.org/gettingstarted for + additional informations. + diff --git a/iwd/iwd b/iwd/iwd new file mode 100755 index 000000000..3844feb03 --- /dev/null +++ b/iwd/iwd @@ -0,0 +1,53 @@ +#!/bin/sh +# +# /etc/rc.d/iwd: start/stop wireless interface +# + +SSD=/sbin/start-stop-daemon +PROG_DHCP=/sbin/dhcpcd +PROG_WIFI=/usr/sbin/iwd +PID_DHCP=/var/run/dhcpcd.pid +PID_WIFI=/var/run/iwd.pid + +OPTS_DHCP="" +OPTS_WIFI="" + + +print_status() { + $SSD --status --pidfile $2 + case $? in + 0) echo "$1 is running with pid $(cat $2)" ;; + 1) echo "$1 is not running but the pid file $2 exists" ;; + 3) echo "$1 is not running" ;; + 4) echo "Unable to determine the program status" ;; + esac +} + +case $1 in + start) + $SSD --start -bmC --pidfile $PID_WIFI --exec $PROG_WIFI -- $OPTS_WIFI && \ + $SSD --start --pidfile $PID_DHCP --exec $PROG_DHCP -- $OPTS_DHCP + RETVAL=$? + ;; + stop) + ( $SSD --stop --retry 10 --pidfile $PID_DHCP + $SSD --stop --remove-pidfile --retry 10 --pidfile $PID_WIFI ) + RETVAL=$? + ;; + restart) + $0 stop + $0 start + ;; + status) + print_status $PROG_WIFI $PID_WIFI + print_status $PROG_DHCP $PID_DHCP + ;; + *) + echo "Usage: $0 [start|stop|restart|status]" + ;; +esac + +exit $RETVAL + +# End of file +