diff options
author | John Southworth <john.southworth@vyatta.com> | 2011-06-16 19:28:05 -0500 |
---|---|---|
committer | John Southworth <john.southworth@vyatta.com> | 2011-06-16 19:28:05 -0500 |
commit | 9dbe987ac425055dbe2848b173980034e6e1d23c (patch) | |
tree | 7c0ef099c0a2b574f2cd478b0ab4be95536dfb59 /functions/tech-support | |
parent | 561acef05101fdd85df74cc3d3281ae477c597d8 (diff) | |
download | vyatta-op-9dbe987ac425055dbe2848b173980034e6e1d23c.tar.gz vyatta-op-9dbe987ac425055dbe2848b173980034e6e1d23c.zip |
Bugfix 7124: make 'show tech-support save' have a .txt at the end of the file name. Make the script show the proper config path '/config/support' instead of '/opt/vyatta/etc/config/support'
Diffstat (limited to 'functions/tech-support')
-rwxr-xr-x | functions/tech-support | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/functions/tech-support b/functions/tech-support index ec2b915..0599c89 100755 --- a/functions/tech-support +++ b/functions/tech-support @@ -14,7 +14,7 @@ function header { OUT=1 FLAG=0 REMOTE=0 -DEFAULT_PATH=/opt/vyatta/etc/config/support +DEFAULT_PATH=/config/support DEFAULT_GROUP=users do_rotate () @@ -37,19 +37,14 @@ CURTIME=`date +%F-%H%M%S` if [ "$1" == "save" ] || [ "$1" == "save-uncompressed" ]; then # "save" or save-uncompressed is specified. save output to file. + OUT="$HOSTNAME.tech-support.$CURTIME.txt" if [ -n "$2" ]; then - if [[ "$2" =~ scp:///* ]]; then - OUT="$HOSTNAME.tech-support.$CURTIME" - REMOTE="1" - elif [[ "$2" =~ ftp:///* ]]; then - OUT="$HOSTNAME.tech-support.$CURTIME" - REMOTE="1" - else + if [[ "$2" =~ scp:///* || "$2" =~ ftp:///* ]]; then + REMOTE="1" + else #file to be save locally - OUT="$2.$HOSTNAME.tech-support.$CURTIME" - fi - else - OUT="$HOSTNAME.tech-support.$CURTIME" + OUT="$2.$OUT" + fi fi if [[ $OUT != /* ]]; then |