Update 2025-01-08 08:15 OpenBSD/amd64-t14

This commit is contained in:
c0dev0id
2025-01-08 08:15:25 +01:00
parent 685a3b4c8d
commit cc3afde694
16 changed files with 556 additions and 0 deletions

35
.bin/obsd-route Executable file
View File

@@ -0,0 +1,35 @@
#!/bin/sh
[ $(id -u) -ne 0 ] && echo "root?" && exit 0
usage() {
echo "obsd-route [start,stop]"
exit 0
}
do_start() {
set -x
sysctl net.inet.ip.forwarding=1
ifconfig trunk0 destroy
ifconfig qwx0 inet autoconf
ifconfig re0 inet 192.168.23.1 netmask 255.255.255.0
rcctl enable dhcpd
rcctl set dhcpd flags re0
rcctl start dhcpd
}
do_stop() {
set -x
sysctl net.inet.ip.forwarding=0
ifconfig qwx0 -inet
ifconfig re0 -inet
rcctl stop dhcpd
rcctl disable dhcpd
sh /etc/netstart
}
case $1 in
start) do_start; ;;
stop) do_stop; ;;
*) usage;
esac