diff options
21 files changed, 26 insertions, 19 deletions
diff --git a/debian/vyatta-op.postinst.in b/debian/vyatta-op.postinst.in index 4f0b3b4..ac650fc 100644 --- a/debian/vyatta-op.postinst.in +++ b/debian/vyatta-op.postinst.in @@ -8,4 +8,6 @@ bindir=@bindir@ ln -sf /usr/sbin/ethtool ${bindir}/sudo-users/ethtool ln -sf /usr/sbin/dmidecode ${bindir}/sudo-users/dmidecode ln -sf /sbin/iptables ${bindir}/sudo-users/iptables - +ln -sf /bin/ip ${bindir}/sudo-users/ip +ln -sf /opt/vyatta/bin/vyatta-show-interfaces.pl ${bindir}/sudo-users/vyatta-show-interfaces.pl +ln -sf /opt/vyatta/sbin/vyatta-interfaces.pl ${bindir}/sudo-users/vyatta-interfaces.pl diff --git a/templates/clear/arp/address/node.tag/node.def b/templates/clear/arp/address/node.tag/node.def index a25ad1f..1cfd2a3 100644 --- a/templates/clear/arp/address/node.tag/node.def +++ b/templates/clear/arp/address/node.tag/node.def @@ -1,3 +1,3 @@ help: Clear ARP cache for address allowed: echo -n '<ip_address>' -run: sudo ip neigh flush to $4 +run: sudo ${vyatta_bindir}/sudo-users/ip neigh flush to $4 diff --git a/templates/clear/arp/interface/node.tag/node.def b/templates/clear/arp/interface/node.tag/node.def index d948ba2..eb0ec26 100644 --- a/templates/clear/arp/interface/node.tag/node.def +++ b/templates/clear/arp/interface/node.tag/node.def @@ -2,4 +2,4 @@ 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 +run: sudo ${vyatta_bindir}/sudo-users/ip neigh flush dev $4 diff --git a/templates/clear/dhcp/client/process/node.def b/templates/clear/dhcp/client/process/node.def index 565e702..50e52ff 100644 --- a/templates/clear/dhcp/client/process/node.def +++ b/templates/clear/dhcp/client/process/node.def @@ -1,2 +1,2 @@ help: Restart the dhcp client process -run: sudo /opt/vyatta/sbin/vyatta-interfaces.pl --restart-dhclient +run: sudo ${vyatta_bindir}/sudo-users/vyatta-interfaces.pl --restart-dhclient diff --git a/templates/clear/interfaces/bridge/counters/node.def b/templates/clear/interfaces/bridge/counters/node.def index ad13229..226394d 100644 --- a/templates/clear/interfaces/bridge/counters/node.def +++ b/templates/clear/interfaces/bridge/counters/node.def @@ -1,2 +1,2 @@ help: Clear all bridge interface counters -run: sudo ${vyatta_bindir}/vyatta-show-interfaces.pl --action=clear --intf-type=$3 +run: sudo ${vyatta_bindir}/sudo-users/vyatta-show-interfaces.pl --action=clear --intf-type="$3" diff --git a/templates/clear/interfaces/bridge/node.tag/counters/node.def b/templates/clear/interfaces/bridge/node.tag/counters/node.def index 985e9ab..ba3199b 100644 --- a/templates/clear/interfaces/bridge/node.tag/counters/node.def +++ b/templates/clear/interfaces/bridge/node.tag/counters/node.def @@ -1,2 +1,2 @@ help: Clear interface counters for a given interface -run: sudo ${vyatta_bindir}/vyatta-show-interfaces.pl --action=clear --intf=$4 +run: sudo ${vyatta_bindir}/sudo-users/vyatta-show-interfaces.pl --action=clear --intf="$4" diff --git a/templates/clear/interfaces/counters/node.def b/templates/clear/interfaces/counters/node.def index 252251a..a29bcbc 100644 --- a/templates/clear/interfaces/counters/node.def +++ b/templates/clear/interfaces/counters/node.def @@ -1,2 +1,2 @@ help: Clear interface counters for all interfaces -run: sudo ${vyatta_bindir}/vyatta-show-interfaces.pl --action=clear +run: sudo ${vyatta_bindir}/sudo-users/vyatta-show-interfaces.pl --action=clear diff --git a/templates/clear/interfaces/ethernet/counters/node.def b/templates/clear/interfaces/ethernet/counters/node.def index e05e218..85a02d5 100644 --- a/templates/clear/interfaces/ethernet/counters/node.def +++ b/templates/clear/interfaces/ethernet/counters/node.def @@ -1,2 +1,2 @@ help: Clear all Ethernet interface counters -run: sudo ${vyatta_bindir}/vyatta-show-interfaces.pl --action=clear --intf-type=$3 +run: sudo ${vyatta_bindir}/sudo-users/vyatta-show-interfaces.pl --action=clear --intf-type="$3" diff --git a/templates/clear/interfaces/ethernet/node.tag/counters/node.def b/templates/clear/interfaces/ethernet/node.tag/counters/node.def index 985e9ab..ba3199b 100644 --- a/templates/clear/interfaces/ethernet/node.tag/counters/node.def +++ b/templates/clear/interfaces/ethernet/node.tag/counters/node.def @@ -1,2 +1,2 @@ help: Clear interface counters for a given interface -run: sudo ${vyatta_bindir}/vyatta-show-interfaces.pl --action=clear --intf=$4 +run: sudo ${vyatta_bindir}/sudo-users/vyatta-show-interfaces.pl --action=clear --intf="$4" diff --git a/templates/clear/interfaces/loopback/counters/node.def b/templates/clear/interfaces/loopback/counters/node.def index 5ebcd3d..eefdac4 100644 --- a/templates/clear/interfaces/loopback/counters/node.def +++ b/templates/clear/interfaces/loopback/counters/node.def @@ -1,2 +1,2 @@ help: Clear all loopback interface counters -run: sudo ${vyatta_bindir}/vyatta-show-interfaces.pl --action=clear --intf-type=$3 +run: sudo ${vyatta_bindir}/sudo-users/vyatta-show-interfaces.pl --action=clear --intf-type="$3" diff --git a/templates/clear/interfaces/loopback/node.tag/counters/node.def b/templates/clear/interfaces/loopback/node.tag/counters/node.def index 985e9ab..ba3199b 100644 --- a/templates/clear/interfaces/loopback/node.tag/counters/node.def +++ b/templates/clear/interfaces/loopback/node.tag/counters/node.def @@ -1,2 +1,2 @@ help: Clear interface counters for a given interface -run: sudo ${vyatta_bindir}/vyatta-show-interfaces.pl --action=clear --intf=$4 +run: sudo ${vyatta_bindir}/sudo-users/vyatta-show-interfaces.pl --action=clear --intf="$4" diff --git a/templates/clear/interfaces/tunnel/counters/node.def b/templates/clear/interfaces/tunnel/counters/node.def index c856a04..7ef46d2 100644 --- a/templates/clear/interfaces/tunnel/counters/node.def +++ b/templates/clear/interfaces/tunnel/counters/node.def @@ -1,2 +1,2 @@ help: Clear all tunnel interface counters -run: sudo ${vyatta_bindir}/vyatta-show-interfaces.pl --action=clear --intf-type=$3 +run: sudo ${vyatta_bindir}/sudo-users/vyatta-show-interfaces.pl --action=clear --intf-type="$3" diff --git a/templates/clear/interfaces/tunnel/node.tag/counters/node.def b/templates/clear/interfaces/tunnel/node.tag/counters/node.def index 985e9ab..ba3199b 100644 --- a/templates/clear/interfaces/tunnel/node.tag/counters/node.def +++ b/templates/clear/interfaces/tunnel/node.tag/counters/node.def @@ -1,2 +1,2 @@ help: Clear interface counters for a given interface -run: sudo ${vyatta_bindir}/vyatta-show-interfaces.pl --action=clear --intf=$4 +run: sudo ${vyatta_bindir}/sudo-users/vyatta-show-interfaces.pl --action=clear --intf="$4" diff --git a/templates/clear/ip/route/cache/node.def b/templates/clear/ip/route/cache/node.def index 3ec559d..9648cef 100644 --- a/templates/clear/ip/route/cache/node.def +++ b/templates/clear/ip/route/cache/node.def @@ -1,2 +1,2 @@ help: Flush the kernel route cache -run: sudo ip route flush cache +run: sudo ${vyatta_bindir}/sudo-users/ip route flush cache diff --git a/templates/clear/ip/route/cache/node.tag/node.def b/templates/clear/ip/route/cache/node.tag/node.def index 288fcbc..37fc458 100644 --- a/templates/clear/ip/route/cache/node.tag/node.def +++ b/templates/clear/ip/route/cache/node.tag/node.def @@ -1,3 +1,3 @@ help: Flush the kernel route cache for a given route allowed: echo -n '<network>' -run: sudo ip route flush cache $5 +run: sudo ${vyatta_bindir}/sudo-users/ip route flush cache $5 diff --git a/templates/show/bridge/node.def b/templates/show/bridge/node.def index 45761f1..69121f6 100644 --- a/templates/show/bridge/node.def +++ b/templates/show/bridge/node.def @@ -1,2 +1,2 @@ help: "Show bridging information" -run: sudo brctl show +run: brctl show diff --git a/templates/show/bridge/node.tag/macs/node.def b/templates/show/bridge/node.tag/macs/node.def index c16fcb5..cbf77da 100644 --- a/templates/show/bridge/node.tag/macs/node.def +++ b/templates/show/bridge/node.tag/macs/node.def @@ -1,2 +1,2 @@ help: Show bridge MAC table -run: sudo brctl showmacs $3 +run: brctl showmacs $3 diff --git a/templates/show/bridge/node.tag/node.def b/templates/show/bridge/node.tag/node.def index d439a03..770165e 100644 --- a/templates/show/bridge/node.tag/node.def +++ b/templates/show/bridge/node.tag/node.def @@ -2,4 +2,4 @@ help: Show bridge information for a given bridge allowed: local -a array ; array=( /sys/class/net/br* ) ; echo -n ${array[@]##*/} -run: sudo brctl show $3 +run: brctl show $3 diff --git a/templates/show/bridge/node.tag/spanning-tree/node.def b/templates/show/bridge/node.tag/spanning-tree/node.def index 8840ee6..33d16d9 100644 --- a/templates/show/bridge/node.tag/spanning-tree/node.def +++ b/templates/show/bridge/node.tag/spanning-tree/node.def @@ -1,2 +1,2 @@ help: Show bridge spanning tree information -run: sudo brctl showstp $3 +run: brctl showstp $3 diff --git a/templates/show/log/tail/node.def b/templates/show/log/tail/node.def new file mode 100644 index 0000000..65bea1c --- /dev/null +++ b/templates/show/log/tail/node.def @@ -0,0 +1,2 @@ +help: Show last lines of messages file +run: tail -f /var/log/messages diff --git a/templates/show/log/tail/node.tag/node.def b/templates/show/log/tail/node.tag/node.def new file mode 100644 index 0000000..00de686 --- /dev/null +++ b/templates/show/log/tail/node.tag/node.def @@ -0,0 +1,3 @@ +help: Show last changes to messages +allowed: echo -n '<NUMBER>' +run: tail -n "$4" /var/log/messages |