aboutsummaryrefslogtreecommitdiff
path: root/eiwd
diff options
context:
space:
mode:
authorWoodpecker CI <emmett1.2miligrams@protonmail.com>2025-06-03 14:32:36 +0000
committerWoodpecker CI <emmett1.2miligrams@protonmail.com>2025-06-03 14:32:36 +0000
commit93a354611e38a6949add5c2e5ccc93ef79b9755f (patch)
tree7fee41752b1047d74c59f8ee046cd62735e7e934 /eiwd
parent35912580b66e9439f91ea441938828ad8aa33b0d (diff)
downloadalicelinux-93a354611e38a6949add5c2e5ccc93ef79b9755f.tar.gz
alicelinux-93a354611e38a6949add5c2e5ccc93ef79b9755f.zip
Woodpecker CI 5171f1fdd74e7137c305450dd69a29fa5be4143f [SKIP CI]
Diffstat (limited to 'eiwd')
-rw-r--r--eiwd/.checksum4
-rw-r--r--eiwd/.files27
-rw-r--r--eiwd/abuild17
-rw-r--r--eiwd/depends1
-rwxr-xr-xeiwd/eiwd.run2
-rw-r--r--eiwd/iwd_passphrase34
-rw-r--r--eiwd/main.conf10
7 files changed, 95 insertions, 0 deletions
diff --git a/eiwd/.checksum b/eiwd/.checksum
new file mode 100644
index 00000000..0f0e48f6
--- /dev/null
+++ b/eiwd/.checksum
@@ -0,0 +1,4 @@
+59287bd6fb2a92798731215827d3d902d90ef09a5faa2f7f36541b11c56b0890 eiwd.run
+84336a016d79ade6dae285a41fb08b3e27faa5ce41c96ac821a61e0038205705 iwd-2.22.tar.xz
+50611454e8f2fedf802cec614ea211567909475f614927abc4ee6815f6baae7f iwd_passphrase
+3a35a3446350cfe49e3da3de80d66f400e57a8c60c79f7394f53c607b7e91b40 main.conf
diff --git a/eiwd/.files b/eiwd/.files
new file mode 100644
index 00000000..f0ea8a62
--- /dev/null
+++ b/eiwd/.files
@@ -0,0 +1,27 @@
+drwxr-xr-x root/root etc/
+drwxr-xr-x root/root etc/iwd/
+-rw-r--r-- root/root etc/iwd/main.conf.new
+drwxr-xr-x root/root etc/sv/
+drwxr-xr-x root/root etc/sv/eiwd/
+-rwxr-xr-x root/root etc/sv/eiwd/run.new
+lrwxrwxrwx root/root etc/sv/eiwd/supervise -> ../../../run/runit/supervise.eiwd
+drwxr-xr-x root/root usr/
+drwxr-xr-x root/root usr/bin/
+-rwxr-xr-x root/root usr/bin/iwd
+-rwxr-xr-x root/root usr/bin/iwd_passphrase
+-rwxr-xr-x root/root usr/bin/iwmon
+drwxr-xr-x root/root usr/share/
+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/iwmon.1.gz
+drwxr-xr-x root/root usr/share/man/man5/
+-rw-r--r-- root/root usr/share/man/man5/iwd.ap.5.gz
+-rw-r--r-- root/root usr/share/man/man5/iwd.config.5.gz
+-rw-r--r-- root/root usr/share/man/man5/iwd.network.5.gz
+drwxr-xr-x root/root usr/share/man/man7/
+-rw-r--r-- root/root usr/share/man/man7/iwd.debug.7.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/eiwd/abuild b/eiwd/abuild
new file mode 100644
index 00000000..97c01ca6
--- /dev/null
+++ b/eiwd/abuild
@@ -0,0 +1,17 @@
+name=eiwd
+version=2.22
+release=1
+source="https://github.com/illiliti/${name}/releases/download/${version}-1/iwd-${version}.tar.xz
+ $name.run
+ iwd_passphrase
+ main.conf"
+sv="$name.run"
+build_opt="--libexecdir=/usr/bin --disable-dbus"
+
+postbuild() {
+ cp $SRC/iwd_passphrase $PKG/usr/bin
+ chmod 755 $PKG/usr/bin/iwd_passphrase
+
+ mkdir -p $PKG/etc/iwd
+ cp $SRC/main.conf $PKG/etc/iwd
+}
diff --git a/eiwd/depends b/eiwd/depends
new file mode 100644
index 00000000..0cb0514d
--- /dev/null
+++ b/eiwd/depends
@@ -0,0 +1 @@
+openresolv
diff --git a/eiwd/eiwd.run b/eiwd/eiwd.run
new file mode 100755
index 00000000..5eb89882
--- /dev/null
+++ b/eiwd/eiwd.run
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec iwd -d 2>&1
diff --git a/eiwd/iwd_passphrase b/eiwd/iwd_passphrase
new file mode 100644
index 00000000..cf100dd4
--- /dev/null
+++ b/eiwd/iwd_passphrase
@@ -0,0 +1,34 @@
+#!/bin/sh
+#
+# Simple script to generate iwd network files.
+
+[ "$1" ] || {
+ printf '%s\n' "usage: printf pass | ${0##*/} ssid" >&2
+ exit 1
+}
+
+# Read the password from 'stdin'.
+read -r pass; [ "$pass" ] || exit 1
+
+# Consider all characters as single-byte.
+export LC_CTYPE=C
+
+# The SSID appears verbatim in the name if it contains
+# only alphanumeric characters, spaces, underscores or
+# minus signs. Otherwise it is encoded as an equal sign
+# followed by the lower-case hex encoding of the name.
+case $1 in
+ *[!A-Za-z0-9_' '-]*)
+ ssid="=$(printf %s "$1" | od -vA n -t x1 | tr -d '\n ')"
+ ;;
+
+ *)
+ ssid=$1
+ ;;
+esac
+
+printf '%s\n\n' "Save this output to /var/lib/iwd/$ssid.psk" >&2
+printf '[Security]\n'
+printf 'Passphrase=%s\n' "$pass"
+printf '\nTIP: You can use this output directly as the\n' >&2
+printf ' help messages are printed to stderr.\n' >&2
diff --git a/eiwd/main.conf b/eiwd/main.conf
new file mode 100644
index 00000000..a2b44370
--- /dev/null
+++ b/eiwd/main.conf
@@ -0,0 +1,10 @@
+[General]
+EnableNetworkConfiguration=true
+UseDefaultInterface=true
+
+[Network]
+RoutePriorityOffset=200
+NameResolvingService=resolvconf
+
+[Scan]
+DisablePeriodicScan=true