diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-02-25 16:35:27 -0800 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-02-25 16:35:27 -0800 |
commit | 61ed2bab2adb0b26627bbfc4fe45c23d5032c6c7 (patch) | |
tree | 45d790e6eeb13ac8e45faf9b527142fd16e23ee7 /functions | |
parent | 3a58fd77b5bb8aaadd7219e756bbc4ae800d1022 (diff) | |
download | vyatta-op-61ed2bab2adb0b26627bbfc4fe45c23d5032c6c7.tar.gz vyatta-op-61ed2bab2adb0b26627bbfc4fe45c23d5032c6c7.zip |
remove usage of sudo in tech-support script
No longer need to be root for this:
1. iptable -L no longer needs root access
2. Use /sys/class/dmi rather than dmidecode
3. Silently ignore dumping ipsec.secrets if not readable
Diffstat (limited to 'functions')
-rw-r--r-- | functions/tech-support | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/functions/tech-support b/functions/tech-support index 61422d9..4d276e0 100644 --- a/functions/tech-support +++ b/functions/tech-support @@ -78,7 +78,13 @@ header PCI Info lspci header System Info -sudo ${vyatta_bindir}/sudo-users/dmidecode +find -L /sys/class/dmi/id -type f 2>/dev/null | \ + while read f; do + if [ -r $f ]; then + echo -n " $(basename $f): " + cat $f + fi + done header Interfaces show interfaces @@ -128,8 +134,10 @@ cat /etc/apt/sources.list header /etc/ipsec.conf cat /etc/ipsec.conf -header /etc/ipsec.secrets -sudo cat /etc/ipsec.secrets +if [ -r /etc/ipsec.secrets ]; then + header /etc/ipsec.secrets + cat /etc/ipsec.secrets +fi header \''ls -l /etc/rc?.d'\' ls -l /etc/rc?.d @@ -138,16 +146,16 @@ header /etc/rc.local cat /etc/rc.local header \''iptables -L -vn'\' -sudo ${vyatta_bindir}/sudo-users/iptables -L -vn +/sbin/iptables -L -vn header \''iptables -t nat -L -vn'\' -sudo ${vyatta_bindir}/sudo-users/iptables -t nat -L -vn +/sbin/iptables -t nat -L -vn header \''iptables -t mangle -L -vn'\' -sudo ${vyatta_bindir}/sudo-users/iptables -t mangle -L -vn +/sbin/iptables -t mangle -L -vn header \''iptables -t raw -L -vn'\' -sudo ${vyatta_bindir}/sudo-users/iptables -t raw -L -vn +/sbin/iptables -t raw -L -vn header \''show ip route'\' show ip route |