ups: include Innova...
This commit is contained in:
parent
e0f6cfe931
commit
c090894009
1 changed files with 2 additions and 4 deletions
6
openwrt/openwrt-configure-nut-ups.sh
Normal file → Executable file
6
openwrt/openwrt-configure-nut-ups.sh
Normal file → Executable file
|
@ -3,7 +3,7 @@
|
|||
# create configuration for nut based on available usb ups
|
||||
|
||||
|
||||
if [ $# -lt 8 ] ; then
|
||||
if [ $# -lt 1 ] ; then
|
||||
echo $0 "address"
|
||||
exit 1
|
||||
fi
|
||||
|
@ -12,11 +12,9 @@ address=$1; shift
|
|||
|
||||
cat <<EOF | ssh -t "root@${address}"
|
||||
set -x
|
||||
opkg update
|
||||
|
||||
i=1
|
||||
|
||||
for ups in \$(lsusb -vv 2>/dev/null | grep -e "iProduct.* UPS" -A1 | awk '/iSerial/ { print \$3 }'); do
|
||||
for ups in \$(lsusb -vv 2>/dev/null | grep -e "iProduct.* UPS" -e "iProduct.*Innova Unity" -A1 | awk '/iSerial/ { print \$3 }'); do
|
||||
|
||||
uci set nut_server.ups\${i}=driver
|
||||
uci set nut_server.ups\${i}.port=auto
|
||||
|
|
Loading…
Reference in a new issue