summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDieter Plaetinck <dieter@plaetinck.be>2010-12-19 22:16:04 +0100
committerDieter Plaetinck <dieter@plaetinck.be>2010-12-19 22:16:04 +0100
commitcb4822b44b4612121b3816b07d66fbd60d05c94b (patch)
tree1435a567ce248c5872dabe4013b9acb2434a5799 /src
parent92971ab76a9234ba13ec18a4b9d0ea89a4daf511 (diff)
parentf171c51616c7fe0a4817c0cf0b946dcdaaaec4d6 (diff)
Merge branch 'master' into btrfs
Diffstat (limited to 'src')
-rwxr-xr-xsrc/aif-report-issues.sh37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/aif-report-issues.sh b/src/aif-report-issues.sh
new file mode 100755
index 0000000..18c91b2
--- /dev/null
+++ b/src/aif-report-issues.sh
@@ -0,0 +1,37 @@
+#!/bin/bash
+RUNTIME_DIR=/tmp/aif
+LOG_DIR=/var/log/aif
+source /usr/lib/libui.sh
+cat - <<EOF
+This script will help you reporting issues and/or seeking help
+What we do, is upload all files in $RUNTIME_DIR and $LOG_DIR to a pastebin
+Usually these files contain no sensitive information, but if you run a custom
+installation procedure/library, make your checks first.
+These are the files in question:
+EOF
+ls -lh $RUNTIME_DIR/* 2>/dev/null
+ls -lh $LOG_DIR/* 2>/dev/null
+report="Uploaded data:"
+if ask_yesno "Send these files?"
+then
+ shopt -s nullglob
+ for i in $RUNTIME_DIR/* $LOG_DIR/*
+ do
+ bin=$(cat $i | curl -sF 'sprunge=<-' http://sprunge.us)
+ bin=${bin/ /} # for some reason there is a space in the beginning
+ report="$report\n$i $bin"
+ done
+fi
+
+echo "It can also be useful to upload a list of currently mounted filesystems:"
+df -hT
+if ask_yesno "Is this ok?"
+then
+ bin=$(df -hT | curl -sF 'sprunge=<-' http://sprunge.us)
+ bin=${bin/ /}
+ report="$report\ndf -hT $bin"
+fi
+echo -e "$report"
+echo "For your convenience, I will paste the report online"
+echo "So you just need to give the following url:"
+echo -e "$report" | curl -sF 'sprunge=<-' http://sprunge.us