ungleich-tools/openwrt-hp-250-g5-add-wifi.sh
2020-11-04 14:36:05 +01:00

21 lines
372 B
Bash
Executable file

#!/bin/sh
if [ $# -lt 1 ]; then
echo "$0 ip-address"
echo " ip-address: where to find the device"
exit 1
fi
openwrt_ip=$1; shift
ping -c3 ${openwrt_ip}
if [ $? -ne 0 ]; then
echo "Cannot reach ${openwrt_ip}, aborting"
exit 1
fi
cat <<EOF | ssh -t "root@${openwrt_ip}"
opkg update
opkg install kmod-iwlwifi iwlwifi-firmware-iwl7265d
EOF