delos_dlan-1200-ac/usr/sbin/plctools-wrapper

17 lines
324 B
Bash

#!/bin/sh
# arg 1 is the tool to call e.g. plctool
# arg 2 is plc device mac address, if empty use the baptized plc real mac address
tool="$1"
shift
device="$1"
shift
[ -z "$device" ] && {
. /lib/functions.sh
device="$(uci_get_state delos baptization DlanMacAddress)"
[ -z "$device" ] && exit 1
}
$tool "$@" "$device"