mirror of
https://codeberg.org/kiss-community/repo
synced 2024-12-21 23:00:06 -07:00
eiwd: add back iwd_passphrase
This commit is contained in:
parent
e78fc2f7d9
commit
47499b1261
@ -9,6 +9,8 @@
|
||||
make
|
||||
make install
|
||||
|
||||
cp -f iwd_passphrase "$1/usr/bin"
|
||||
|
||||
# Install runit service.
|
||||
mkdir -p "$1/etc/sv/eiwd"
|
||||
cp -f eiwd.run "$1/etc/sv/eiwd/run"
|
||||
|
@ -1,2 +1,3 @@
|
||||
3f0ceb79c662050325034dcd8a7b5cdf0d7e80560b65ca5f16bce7e115247a8e
|
||||
9798194395fbc26a1ad8465bab7ac9c9e94c3a51edaf5987a414037c34169e63
|
||||
bf22ccc74ff06d56f8525e3d41361eb413de56e5eaccbf9cfdfb1bf5491dbf40
|
||||
|
34
extra/eiwd/files/iwd_passphrase
Executable file
34
extra/eiwd/files/iwd_passphrase
Executable file
@ -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
|
@ -1,2 +1,3 @@
|
||||
https://github.com/illiliti/eiwd/releases/download/VERSION-1/iwd-MAJOR.MINOR.tar.xz
|
||||
files/eiwd.run
|
||||
files/iwd_passphrase
|
||||
|
Loading…
Reference in New Issue
Block a user