dotfiles/.bin/OLD/ifonly

12 lines
232 B
Plaintext
Raw Normal View History

#!/bin/sh
only=$1
for if in $(ifconfig | grep "^[a-z]" | cut -d":" -f1 | grep -Ev "lo0|enc0|pflog0")
do
doas ifconfig $if down
doas ifconfig $if -inet
doas ifconfig $if -inet6
done
doas ifconfig $only inet autoconf up