From 5b0aa0594ac418bfd91a6530f208365bbf9021e3 Mon Sep 17 00:00:00 2001 From: Stig Thormodsrud Date: Fri, 1 Feb 2008 13:12:49 -0800 Subject: Add 'clear arp ' bug 2702 --- templates/clear/arp/address/node.def | 1 + templates/clear/arp/address/node.tag/node.def | 3 +++ templates/clear/arp/interface/node.def | 1 + templates/clear/arp/interface/node.tag/node.def | 5 +++++ templates/clear/arp/node.def | 1 + 5 files changed, 11 insertions(+) create mode 100644 templates/clear/arp/address/node.def create mode 100644 templates/clear/arp/address/node.tag/node.def create mode 100644 templates/clear/arp/interface/node.def create mode 100644 templates/clear/arp/interface/node.tag/node.def create mode 100644 templates/clear/arp/node.def diff --git a/templates/clear/arp/address/node.def b/templates/clear/arp/address/node.def new file mode 100644 index 0000000..149cf76 --- /dev/null +++ b/templates/clear/arp/address/node.def @@ -0,0 +1 @@ +help: Clear ARP cache for address diff --git a/templates/clear/arp/address/node.tag/node.def b/templates/clear/arp/address/node.tag/node.def new file mode 100644 index 0000000..a25ad1f --- /dev/null +++ b/templates/clear/arp/address/node.tag/node.def @@ -0,0 +1,3 @@ +help: Clear ARP cache for address +allowed: echo -n '' +run: sudo ip neigh flush to $4 diff --git a/templates/clear/arp/interface/node.def b/templates/clear/arp/interface/node.def new file mode 100644 index 0000000..9dbcaff --- /dev/null +++ b/templates/clear/arp/interface/node.def @@ -0,0 +1 @@ +help: Clear ARP cache for interface diff --git a/templates/clear/arp/interface/node.tag/node.def b/templates/clear/arp/interface/node.tag/node.def new file mode 100644 index 0000000..d948ba2 --- /dev/null +++ b/templates/clear/arp/interface/node.tag/node.def @@ -0,0 +1,5 @@ +help: Clear ARP cache for interface +allowed: local -a array ; + array=( /sys/class/net/{eth,vmnet}* ) ; + echo -n ${array[@]##*/} +run: sudo ip neigh flush dev $4 diff --git a/templates/clear/arp/node.def b/templates/clear/arp/node.def new file mode 100644 index 0000000..08b3f7a --- /dev/null +++ b/templates/clear/arp/node.def @@ -0,0 +1 @@ +help: Clear Address Resolution Protocol cache -- cgit v1.2.3