aboutsummaryrefslogtreecommitdiff
path: root/repos/extra/eiwd
diff options
context:
space:
mode:
authoremmett1 <emmett1.2miligrams@protonmail.com>2024-05-24 12:22:12 +0800
committeremmett1 <emmett1.2miligrams@protonmail.com>2024-05-24 12:22:12 +0800
commit46ca440e9d6cc606d9c3233021e32d24b25172cf (patch)
treeeeb573e47ac56498fbf74bda6d22fac47038ecab /repos/extra/eiwd
parent8c2e7bb570c11a51fdcecf7302af4058757d862c (diff)
downloadalicelinux-46ca440e9d6cc606d9c3233021e32d24b25172cf.tar.gz
alicelinux-46ca440e9d6cc606d9c3233021e32d24b25172cf.zip
added repos
Diffstat (limited to 'repos/extra/eiwd')
-rw-r--r--repos/extra/eiwd/.files25
-rw-r--r--repos/extra/eiwd/depends1
-rw-r--r--repos/extra/eiwd/eiwd.run2
-rw-r--r--repos/extra/eiwd/info9
-rw-r--r--repos/extra/eiwd/iwd_passphrase34
-rw-r--r--repos/extra/eiwd/main.conf10
-rw-r--r--repos/extra/eiwd/postbuild5
7 files changed, 86 insertions, 0 deletions
diff --git a/repos/extra/eiwd/.files b/repos/extra/eiwd/.files
new file mode 100644
index 00000000..54ed75ee
--- /dev/null
+++ b/repos/extra/eiwd/.files
@@ -0,0 +1,25 @@
+drwxr-xr-x root/root etc/
+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/repos/extra/eiwd/depends b/repos/extra/eiwd/depends
new file mode 100644
index 00000000..0cb0514d
--- /dev/null
+++ b/repos/extra/eiwd/depends
@@ -0,0 +1 @@
+openresolv
diff --git a/repos/extra/eiwd/eiwd.run b/repos/extra/eiwd/eiwd.run
new file mode 100644
index 00000000..5eb89882
--- /dev/null
+++ b/repos/extra/eiwd/eiwd.run
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec iwd -d 2>&1
diff --git a/repos/extra/eiwd/info b/repos/extra/eiwd/info
new file mode 100644
index 00000000..75883b76
--- /dev/null
+++ b/repos/extra/eiwd/info
@@ -0,0 +1,9 @@
+name=eiwd
+version=2.16
+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"
diff --git a/repos/extra/eiwd/iwd_passphrase b/repos/extra/eiwd/iwd_passphrase
new file mode 100644
index 00000000..cf100dd4
--- /dev/null
+++ b/repos/extra/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/repos/extra/eiwd/main.conf b/repos/extra/eiwd/main.conf
new file mode 100644
index 00000000..a2b44370
--- /dev/null
+++ b/repos/extra/eiwd/main.conf
@@ -0,0 +1,10 @@
+[General]
+EnableNetworkConfiguration=true
+UseDefaultInterface=true
+
+[Network]
+RoutePriorityOffset=200
+NameResolvingService=resolvconf
+
+[Scan]
+DisablePeriodicScan=true
diff --git a/repos/extra/eiwd/postbuild b/repos/extra/eiwd/postbuild
new file mode 100644
index 00000000..eaa075a2
--- /dev/null
+++ b/repos/extra/eiwd/postbuild
@@ -0,0 +1,5 @@
+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