From b4275461305f74798c7805ce2a5d25105e82caea Mon Sep 17 00:00:00 2001 From: Kim Hagen Date: Mon, 8 Feb 2016 11:56:29 -0500 Subject: Update debian live mountpoin. --- functions/interpreter/vyatta-image-complete | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'functions') diff --git a/functions/interpreter/vyatta-image-complete b/functions/interpreter/vyatta-image-complete index 622123b..cfc1c90 100644 --- a/functions/interpreter/vyatta-image-complete +++ b/functions/interpreter/vyatta-image-complete @@ -29,11 +29,11 @@ _vyatta_image_is_file() if [[ $topdir == "running" ]]; then cur="/${cur}" elif [[ $topdir == "disk-install" ]]; then - cur="/live/image/${cur}" + cur="/lib/live/mount/persistence/${cur}" elif [[ ${cur:0:1} =~ "/" ]]; then cur=${cur} else - cur="/live/image/boot/${topdir}/live-rw/${cur}" + cur="/lib/live/mount/persistence/boot/${topdir}/rw/${cur}" fi if [[ -f ${cur} ]]; then return 0; @@ -75,14 +75,14 @@ _vyatta_image_path_complete() return fi if [[ ${cur} == "" ]]; then - reply=( $(compgen -d /live/image/boot/ | grep -v grub) ) + reply=( $(compgen -d /lib/live/mount/persistence/boot/ | grep -v grub) ) for i in `seq 0 $[${#reply[@]}-1]`; do file=${reply[$i]} - reply[$i]=${file/#\/live\/image\/boot\//} + reply[$i]=${file/#\/lib\/live\/mount\/persistence\/boot\//} reply[$i]="${reply[$i]}://config/" done reply+=( "running://config/" ) - if [[ -d /live/image/opt/vyatta/etc/config || -d /live/image/config ]]; then + if [[ -d /lib/live/mount/persistence/opt/vyatta/etc/config || -d /lib/live/mount/persistence/config ]]; then reply+=( "disk-install://" ) fi _vyatta_op_noncompletions=( "${non_comps[@]}" ) @@ -100,9 +100,9 @@ _vyatta_image_path_complete() if [[ $isrunningimg == "running" ]];then cur="/" elif [[ $isdiskinstall == "disk-install" ]]; then - cur="/live/image/" + cur="/lib/live/mount/persistence/" else - cur="/live/image/boot/${cur}" + cur="/lib/live/mount/persistence/boot/${cur}" fi reply=( $(compgen -f ${cur} | grep -v grub) ) for i in `seq 0 $[${#reply[@]}-1]`; do @@ -112,8 +112,8 @@ _vyatta_image_path_complete() elif [[ $isdiskinstall == "disk-install" ]]; then reply[$i]="disk-install://" else - reply[$i]=${file/#\/live\/image\/boot\//} - if [[ -d /live/image/boot/${reply[$i]} ]]; then + reply[$i]=${file/#\/lib\/live\/mount\/persistence\/boot\//} + if [[ -d /ib/live/mount/persistence/boot/${reply[$i]} ]]; then reply[$i]="${reply[$i]/#\//}://config/" fi fi @@ -125,9 +125,9 @@ _vyatta_image_path_complete() if [[ $topdir == "running" ]]; then cur="/${cur}" elif [[ $topdir == "disk-install" ]]; then - cur="/live/image/${cur}" + cur="/ib/live/mount/persistence/${cur}" else - cur="/live/image/boot/${topdir}/live-rw/${cur}" + cur="/ib/live/mount/persistence/boot/${topdir}/rw/${cur}" fi reply=( $(compgen -f ${cur}) ) # for loop from _filedirs() in /etc/bash_completion @@ -148,10 +148,10 @@ _vyatta_image_path_complete() if [[ $topdir == "running" ]]; then reply[$i]=${file/#\//"$topdir://"} elif [[ $topdir == "disk-install" ]]; then - reply[$i]=${file/#\/live\/image\//"$topdir://"} + reply[$i]=${file/#\/lib\/live\/mount\/persistence\//"$topdir://"} else - reply[$i]=${file/#\/live\/image\/boot\/$topdir/"$topdir://"} - reply[$i]=${reply[$i]/\/live-rw\/} + reply[$i]=${file/#\/lib\/live\/mount\/persistence\/boot\/$topdir/"$topdir://"} + reply[$i]=${reply[$i]/\/rw\/} fi done fi -- cgit v1.2.3 From 5bcdfaec5070a3eac32dca289167dc995db75b6b Mon Sep 17 00:00:00 2001 From: Ewald van Geffen Date: Sun, 11 Dec 2016 22:52:35 +0100 Subject: T207: modified brctl location --- functions/tech-support | 6 +++--- templates/show/bridge/node.def | 2 +- templates/show/bridge/node.tag/macs/node.def | 2 +- templates/show/bridge/node.tag/node.def | 2 +- templates/show/bridge/node.tag/spanning-tree/node.def | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) (limited to 'functions') diff --git a/functions/tech-support b/functions/tech-support index 680dc09..e4602d2 100755 --- a/functions/tech-support +++ b/functions/tech-support @@ -122,11 +122,11 @@ header Number of incomplete entries in ARP table show arp | grep incomplete | wc -l header Bridge -/usr/sbin/brctl show +/sbin/brctl show for br in $(/opt/vyatta/sbin/vyatta-interfaces.pl --show=bridge) do header "Bridge Information for $br" - /usr/sbin/brctl showstp $br - /usr/sbin/brctl showmacs $br + /sbin/brctl showstp $br + /sbin/brctl showmacs $br done header Serial diff --git a/templates/show/bridge/node.def b/templates/show/bridge/node.def index a1ed782..86d0193 100644 --- a/templates/show/bridge/node.def +++ b/templates/show/bridge/node.def @@ -1,2 +1,2 @@ help: Show bridging information -run: /usr/sbin/brctl show +run: /sbin/brctl show diff --git a/templates/show/bridge/node.tag/macs/node.def b/templates/show/bridge/node.tag/macs/node.def index d07958c..e985437 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 Media Access Control (MAC) address table -run: /usr/sbin/brctl showmacs "$3" +run: /sbin/brctl showmacs "$3" diff --git a/templates/show/bridge/node.tag/node.def b/templates/show/bridge/node.tag/node.def index d20611f..0ae82f1 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 interface allowed: local -a array ; array=( /sys/class/net/br* ) ; echo -n '' ${array[@]##*/} -run: /usr/sbin/brctl show "$3" +run: /sbin/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 3921867..360d15a 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: /usr/sbin/brctl showstp "$3" +run: /sbin/brctl showstp "$3" -- cgit v1.2.3 From 98c47096b1b008066963b8e99ce792f0f5127345 Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Sun, 10 Jun 2018 22:14:06 +0200 Subject: Related to T689: update the show tech-support scripts. Remove references to Vyatta. Remove all references to serial WAN interfaces: not supported since forever. Remove references to IPS, also not supported since forever. Update configuration path for NAT. Do not try to check if VRRP is configured since it can be inside VIFs, the old check was incomplete. --- functions/tech-support | 111 ++++--------------------------------------- functions/tech-support-brief | 2 +- 2 files changed, 11 insertions(+), 102 deletions(-) (limited to 'functions') diff --git a/functions/tech-support b/functions/tech-support index e4602d2..5c619d6 100755 --- a/functions/tech-support +++ b/functions/tech-support @@ -75,7 +75,7 @@ header Entitlement show entitlement fi -header Vyatta Version and Package Changes +header VyOS Version and Package Changes show version all header Configuration File @@ -104,12 +104,12 @@ header Ethernet header Interface statistics ip -s link show -for eth in $(/opt/vyatta/sbin/vyatta-interfaces.pl --show=ethernet) +for eth in $(${vyos_completion_dir}/list_interfaces.py --type=ethernet) do header "Physical Interface statistics for $eth" sudo ethtool -S $eth done -for eth in $(/opt/vyatta/sbin/vyatta-interfaces.pl --show=ethernet) +for eth in $(${vyos_completion_dir}/list_interfaces.py --type=ethernet) do header "Physical Interface Details for $eth" show interfaces ethernet $eth physical /sbin/ethtool -k $eth @@ -123,83 +123,12 @@ show arp | grep incomplete | wc -l header Bridge /sbin/brctl show -for br in $(/opt/vyatta/sbin/vyatta-interfaces.pl --show=bridge) +for br in $(${vyos_completion_dir}/list_interfaces.py --type=bridge) do header "Bridge Information for $br" /sbin/brctl showstp $br /sbin/brctl showmacs $br done -header Serial - -header "WAN Interface Hardware Information (wanrouter hwprobe)" -is_sangoma='lspci -n -d '1923:*'' -is_adsl='lspci -n -d '14bc:*'' -if [ -z "$is_sangoma" -a -z "$is_adsl" ]; then - - sudo wanrouter hwprobe - -header "WAN Interface Software Version (wanrouter version)" -wanrouter version - -header "WAN Interface Debugging Information (wanrouter debug)" -wanrouter debug - -header "WAN Interface Connection Status Information (wanrouter summary)" -wanrouter summary - -header "WAN Interface Information Summary (wanrouter status)" -wanrouter status - -header "WAN Interface Driver Information (wanrouter modules)" -wanrouter modules - -if [ -e /etc/wanpipe/wanrouter.rc ]; then - header "WAN Interface Startup Script (/etc/wanpipe/wanrouter.rc)" - cat /etc/wanpipe/wanrouter.rc -fi - -header WAN Interfaces -wanifs=( /sys/class/net/wan* ) -wanifs=`echo -n ${wanifs[@]##*/}` - -echo "wanifs are $wanifs" - -for ifname in $wanifs ; do - header "wanpipemon -i $ifname -c sc" - sudo wanpipemon -i $ifname -c sc - - header "wanpipemon -i $ifname -c so" - sudo wanpipemon -i $ifname -c so - - header "wanpipemon -i $ifname -c xcv" - sudo wanpipemon -i $ifname -c xcv - - header "wanpipemon -i $ifname -c xru" - sudo wanpipemon -i $ifname -c xru - - header "wanpipemon -i $ifname -c xm" - sudo wanpipemon -i $ifname -c xm - - header "wanpipemon -i $ifname -c xl" - sudo wanpipemon -i $ifname -c xl - - header "wanpipemon -i $ifname -c Ta" - sudo wanpipemon -i $ifname -c Ta -done - -for i in /etc/wanpipe/wanpipe*.conf ; do - if [ -e $i ]; then - header $i - cat $i - fi -done - -header "WAN Interface Configuration Log (wanrouter conflog)" -wanrouter conflog - -else -echo "Wanpipe not configured" -fi header ROUTING @@ -465,16 +394,6 @@ else echo "Firewall is not configured" fi -header IPS -if cli-shell-api existsActive content-inspection; then - header IPS log - show ips log - header IPS Update-Log - show ips update-log -else - echo "IPS is not configured" -fi - header IPSec if cli-shell-api existsActive vpn ipsec; then header IPSec Status @@ -498,7 +417,7 @@ else fi header NAT -if cli-shell-api existsActive service nat; then +if cli-shell-api existsActive nat; then header NAT Rules show nat rules header NAT Statistics @@ -510,12 +429,11 @@ else fi -header NETFLOW -if cli-shell-api existsActive system flow-accounting netflow; then - header NetFlow Accounting +header FlowAccounting +if cli-shell-api existsActive system flow-accounting; then show flow-accounting else - echo "Netflow is not configured" + echo "Flow accounting is not configured" fi header OPENVPN @@ -618,17 +536,8 @@ else fi header VRRP -found=0 -for eth in $(cd /sys/class/net; echo eth*); do - if cli-shell-api existsActive interfaces ethernet $eth vrrp; then - header \''show vrrp'\' - show vrrp - found=1 - fi -done -if [ $found -eq 0 ]; then - echo "VRRP is not configured" -fi +# XXX: not checking if configured, we'd have to walk all VIFs +show vrrp detail header WAN LOAD BALANCING if cli-shell-api existsActive load-balancing wan; then diff --git a/functions/tech-support-brief b/functions/tech-support-brief index 998adaf..6035d4a 100755 --- a/functions/tech-support-brief +++ b/functions/tech-support-brief @@ -71,7 +71,7 @@ header Show Tech-Support Brief header CONFIGURATION -header Vyatta Version and Package Changes +header VyOS Version and Package Changes show version all header Running configuration -- cgit v1.2.3