commit c8593ac

hovercats  ·  2024-02-06 20:36:26 +0000 UTC
parent 885e1b5
eiwd: import
7 files changed,  +79, -0
+25, -0
 1@@ -0,0 +1,25 @@
 2+#!/bin/sh -e
 3+
 4+./configure \
 5+    --prefix=/ \
 6+    --libexecdir=/bin \
 7+    --localstatedir=/var \
 8+    --disable-dbus \
 9+    --disable-shared \
10+    --enable-static
11+
12+make LDFLAGS="$LDFLAGS -static-pie" CFLAGS="$CFLAGS -fPIE"
13+make DESTDIR="$1" install
14+
15+cp -f iwd_passphrase "$1/bin"
16+
17+mkdir -p "$1/etc/rcsm/avail"
18+cp -f  eiwd.run "$1/etc/rcsm/avail/eiwd"
19+
20+# Compress manpages
21+gzip -9 -n "$1/share/man/man8/iwd.8"
22+gzip -9 -n "$1/share/man/man7/iwd.debug.7"
23+gzip -9 -n "$1/share/man/man5/iwd.ap.5"
24+gzip -9 -n "$1/share/man/man5/iwd.network.5"
25+gzip -9 -n "$1/share/man/man5/iwd.config.5"
26+gzip -9 -n "$1/share/man/man1/iwmon.1"
+3, -0
1@@ -0,0 +1,3 @@
2+dcb37c0a099165d87a8ac5cb12e2a5e9b9fe4feda513331c6f19cbd6e95cb6c147
3+fc4f68f28fd3a6652af473c0099721af9f855814dd27fea09bf876ec22b56feeac
4+50611454e8f2fedf802cec614ea211567909475f614927abc4ee6815f6baae7f6d
+1, -0
1@@ -0,0 +1 @@
2+#linux-headers make
+12, -0
 1@@ -0,0 +1,12 @@
 2+#!/bin/rc
 3+
 4+switch($1) {
 5+case -s
 6+	exec iwd -d
 7+case -k
 8+	PID=`{pidof iwd}
 9+	kill -9 $PID
10+case *
11+	printf 'Invalid argument\n'
12+	printf 'Usage: -s|-k\n'
13+}
+34, -0
 1@@ -0,0 +1,34 @@
 2+#!/bin/sh
 3+#
 4+# Simple script to generate iwd network files.
 5+
 6+[ "$1" ] || {
 7+    printf '%s\n' "usage: printf pass | ${0##*/} ssid" >&2
 8+    exit 1
 9+}
10+
11+# Read the password from 'stdin'.
12+read -r pass; [ "$pass" ] || exit 1
13+
14+# Consider all characters as single-byte.
15+export LC_CTYPE=C
16+
17+# The SSID appears verbatim in the name if it contains
18+# only alphanumeric characters, spaces, underscores or
19+# minus signs. Otherwise it is encoded as an equal sign
20+# followed by the lower-case hex encoding of the name.
21+case $1 in
22+    *[!A-Za-z0-9_' '-]*)
23+        ssid="=$(printf %s "$1" | od -vA n -t x1 | tr -d '\n ')"
24+    ;;
25+
26+    *)
27+        ssid=$1
28+    ;;
29+esac
30+
31+printf '%s\n\n' "Save this output to /var/lib/iwd/$ssid.psk" >&2
32+printf '[Security]\n'
33+printf 'Passphrase=%s\n' "$pass"
34+printf '\nTIP: You can use this output directly as the\n' >&2
35+printf '     help messages are printed to stderr.\n' >&2
+3, -0
1@@ -0,0 +1,3 @@
2+https://github.com/illiliti/eiwd/releases/download/2.10-1/iwd-2.10.tar.xz
3+files/eiwd.run
4+files/iwd_passphrase
+1, -0
1@@ -0,0 +1 @@
2+2.10 1