aboutsummaryrefslogtreecommitdiff
path: root/net/nft-qos/files/nft-qos-monitor.hotplug
diff options
context:
space:
mode:
Diffstat (limited to 'net/nft-qos/files/nft-qos-monitor.hotplug')
-rw-r--r--net/nft-qos/files/nft-qos-monitor.hotplug13
1 files changed, 13 insertions, 0 deletions
diff --git a/net/nft-qos/files/nft-qos-monitor.hotplug b/net/nft-qos/files/nft-qos-monitor.hotplug
new file mode 100644
index 000000000..df04fa6d0
--- /dev/null
+++ b/net/nft-qos/files/nft-qos-monitor.hotplug
@@ -0,0 +1,13 @@
+#!/bin/sh
+#
+# Copyright 2018 rosysong@rosinson.com
+#
+
+. /lib/nft-qos/monitor.sh
+
+logger -t nft-qos-monitor "ACTION=$ACTION, MACADDR=$MACADDR, IPADDR=$IPADDR, HOSTNAME=$HOSTNAME"
+
+case "$ACTION" in
+ add | update) qosdef_init_env && qosdef_monitor_add $MACADDR $IPADDR $HOSTNAME;;
+ remove) qosdef_init_env && qosdef_monitor_del $MACADDR $IPADDR $HOSTNAME;;
+esac