ungleich-tools/openwrt/openwrt-hp-250-g5-add-wifi.sh

22 lines
387 B
Bash
Raw Normal View History

#!/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 wpa-supplicant
EOF