Update 2024-02-14 07:51 OpenBSD/amd64-x13

This commit is contained in:
c0dev0id
2024-02-14 07:54:31 +01:00
parent b55e6a3616
commit 9624895938
373 changed files with 19074 additions and 3045 deletions

47
.bin/OLD/network Executable file
View File

@@ -0,0 +1,47 @@
#!/bin/sh
if_cmd() {
doas ifconfig $@
}
destroy_interface() {
if_cmd $1 > /dev/null 2>&1
[ $? -eq 0 ] && ( doas ifconfig $1 down \
&& doas ifconfig $1 destroy )
}
destroy_all() {
destroy_interface iwx0
destroy_interface re0
destroy_interface ure0
}
setup_wifi() {
destroy_interface re0
destroy_interface ure0
destroy_interface iwx0
doas route -n flush
if_cmd iwx0 -joinlist
if_cmd iwx0 join DiscMate wpakey GeekConnection23
if_cmd iwx0 inet autoconf
if_cmd iwx0 inet6 autoconf
if_cmd iwx0 up
}
setup_eth() {
destroy_interface re0
destroy_interface ure0
destroy_interface iwx0
doas route -n flush
if_cmd $1 inet autoconf
if_cmd $1 inet6 autoconf
if_cmd $1 up
}
case $1 in
wifi) setup_wifi; ;;
re) setup_eth re0; ;;
ure) setup_eth ure0; ;;
esac