summaryrefslogtreecommitdiffstats
path: root/utils/pb-sos
diff options
context:
space:
mode:
Diffstat (limited to 'utils/pb-sos')
-rwxr-xr-xutils/pb-sos10
1 files changed, 7 insertions, 3 deletions
diff --git a/utils/pb-sos b/utils/pb-sos
index 3fa8e89..e3e8f6b 100755
--- a/utils/pb-sos
+++ b/utils/pb-sos
@@ -2,7 +2,7 @@
diagdir="diag"
tarfile="pb-sos.tar"
-tarflags=""
+tarflags="-cf"
corefile="/core"
verbose=0
@@ -28,7 +28,7 @@ fi
while [ $# -gt 0 ]
do
case "$1" in
- -v) verbose=1; tarflags="$tarflags --verbose";;
+ -v) verbose=1; tarflags="--verbose $tarflags";;
-f) tarfile="$2"; shift;;
-d) desthost="$2"; shift;;
--) shift; break;;
@@ -69,7 +69,11 @@ cat /sys/firmware/opal/msglog > /$diagdir/msglog
log "Compressing..."
cd /
-tar $tarflags -cf $tarfile $diagdir
+
+tar $tarflags $tarfile $diagdir
+gzip < $tarfile > $tarfile.gz
+rm -f $tarfile
+tarfile="$tarfile.gz"
echo "Complete, tarfile location $tarfile"
OpenPOWER on IntegriCloud