packages/net/mwan3/files/etc/hotplug.d/iface/16-mwan3-user
Florian Eckert 3f79fcb756 net/mwan3: pass environment variables to mwan3-user
User scripts conversion from luci-app-wan3 will be simplified if the variables
are passed by env instead of arguments.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2017-03-21 08:31:06 +01:00

13 lines
262 B
Bash

#!/bin/sh
[ -f "/etc/mwan3.user" ] && {
. /lib/functions.sh
config_load mwan3
config_get enabled "$INTERFACE" enabled 0
[ "${enabled}" = "1" ] || exit 0
env -i ACTION="$ACTION" INTERFACE="$INTERFACE" DEVICE="$DEVICE" \
/bin/sh /etc/mwan3.user
}
exit 0