summaryrefslogtreecommitdiff
path: root/functions/tech-support
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2007-12-05 14:01:46 -0800
committerAn-Cheng Huang <ancheng@vyatta.com>2007-12-05 14:01:46 -0800
commit1b7953907e3c6bb86b227e85485de48d490ea6bc (patch)
treeb31922c71f9c84e64cc6aa90c95252e487ddde63 /functions/tech-support
parent39c6b2cb328ad2438a0eb6b6217715f80b2bda77 (diff)
downloadvyatta-op-1b7953907e3c6bb86b227e85485de48d490ea6bc.tar.gz
vyatta-op-1b7953907e3c6bb86b227e85485de48d490ea6bc.zip
fix "show tech-support" for "users"
Diffstat (limited to 'functions/tech-support')
-rw-r--r--functions/tech-support17
1 files changed, 10 insertions, 7 deletions
diff --git a/functions/tech-support b/functions/tech-support
index 188879e..b2c9958 100644
--- a/functions/tech-support
+++ b/functions/tech-support
@@ -13,14 +13,15 @@ function header {
OUT=1
DEFAULT_PATH=/opt/vyatta/etc/config/support
+DEFAULT_GROUP=users
do_rotate ()
{
local count=`ls -t $DEFAULT_PATH/*.tech-support.* 2>/dev/null |wc -l`
if (( count >= 10 )); then
local dfile=`ls -t $DEFAULT_PATH/*.tech-support.* 2>/dev/null |tail -1`
- rm -f $dfile
- echo "Removed old tech-support output file '$dfile'"
+ rm -f $dfile >&/dev/null \
+ && echo "Removed old tech-support output file '$dfile'"
fi
}
@@ -37,6 +38,8 @@ if [ "$1" == "save" ]; then
if [[ $OUT != /* ]]; then
# it's not absolute path. save in default path.
mkdir -p $DEFAULT_PATH >& /dev/null
+ chgrp $DEFAULT_GROUP $DEFAULT_PATH >& /dev/null
+ chmod 775 $DEFAULT_PATH >& /dev/null
OUT="$DEFAULT_PATH/$OUT"
do_rotate
fi
@@ -75,7 +78,7 @@ header PCI Info
lspci
header System Info
-sudo dmidecode
+sudo ${vyatta_bindir}/sudo-users/dmidecode
header Interfaces
show interfaces
@@ -141,16 +144,16 @@ header /etc/rc.local
cat /etc/rc.local
header \''iptables -L -vn'\'
-sudo iptables -L -vn
+sudo ${vyatta_bindir}/sudo-users/iptables -L -vn
header \''iptables -t nat -L -vn'\'
-sudo iptables -t nat -L -vn
+sudo ${vyatta_bindir}/sudo-users/iptables -t nat -L -vn
header \''iptables -t mangle -L -vn'\'
-sudo iptables -t mangle -L -vn
+sudo ${vyatta_bindir}/sudo-users/iptables -t mangle -L -vn
header \''iptables -t raw -L -vn'\'
-sudo iptables -t raw -L -vn
+sudo ${vyatta_bindir}/sudo-users/iptables -t raw -L -vn
header \''show ip route'\'
show ip route