+++ /dev/null
-#! /bin/sh -e
-
-name="`basename $0`"
-d="`date "+%Y%m%d%H%M%S"`"
-
-saved_tarball="/tmp/$name/$name-$d.tar.bz2"
-base_path="`dirname "$saved_tarball"`/`basename "$saved_tarball" .tar.bz2`"
-
-files=""
-
-welcome()
-{
-cat <<EOF
-XenClient $name
-
-This application will collate the Xen dmesg output, details of the
-hardware configuration of your machine, information about the build of
-Xen that you are using, plus, if you allow it, various logs.
-
-The collated information will be saved as a .tar.bz2 for archiving or
-sending to a Technical Support Representative.
-
-To copy the file away from the host a command like scp or ftpput could
-be used.
- scp <local-file> <remote-user>@<remote-host>:<remote-file>
- ftpput <remote-host> <remote-file> <local-file>
-
-The logs may contain private information, and if you are at all
-worried about that, you should exit now, or you should explicitly
-exclude those logs from the archive.
-
-EOF
-}
-
-archive()
-{
- local out="$1"
- local files="$2"
-
- tar -cfO $files | bzip2 -z -c > "$out"
-}
-
-save_file()
-{
- local save_path="$1"
- local save_file="$2"
- local save_out="$3"
-
- cd "$save_path"
- archive "${base_path}/${save_out}.tar.bz2" $save_file > ${base_path}/${name}.log 2>&1
- files="$files ${save_out}.tar.bz2"
- cd - > /dev/null
-}
-
-save_out()
-{
- local save_out_cmd="$1"
- local save_out_out="$2"
-
- $save_out_cmd > "${base_path}/${save_out_out}.log" 2>&1
- files="$files ${save_out_out}.log"
-}
-
-bugtool_file()
-{
- local base="$1"
-
- cd "${base_path}"
- archive "${saved_tarball}" "$files ${name}.log"
- cd - > /dev/null
- rm -rf "${base_path}"
-}
-
-welcome
-
-mkdir -p "${base_path}"
-save_file "/var/log" "messages*" "syslog"
-save_file "/config/vms" "*" "vms"
-save_file "/var/log" "xenstored-access*" "xenstored-access"
-save_file "/tmp" "xenmgr-xenvm*" "xenmgr-xenvm"
-save_out "dmesg" "dmesg"
-save_out "xenops dmesg" "xen_dmesg"
-save_out "dmidecode" "dmidecode"
-save_out "xenops list" "xenops_list"
-save_out "brctl show" "brctl_show"
-save_out "ifconfig" "ifconfig"
-bugtool_file "/tmp/$name/$name-$d"
-sync
-
-echo "Writing tarball ${saved_tarball} successful."
--- /dev/null
+#! /bin/sh -e
+
+name="`basename $0`"
+d="`date "+%Y%m%d%H%M%S"`"
+
+saved_tarball="/tmp/$name/$name-$d.tar.bz2"
+base_path="`dirname "$saved_tarball"`/`basename "$saved_tarball" .tar.bz2`"
+
+files=""
+
+welcome()
+{
+cat <<EOF
+XenClient $name
+
+This application will collate the Xen dmesg output, details of the
+hardware configuration of your machine, information about the build of
+Xen that you are using, plus, if you allow it, various logs.
+
+The collated information will be saved as a .tar.bz2 for archiving or
+sending to a Technical Support Representative.
+
+To copy the file away from the host a command like scp or ftpput could
+be used.
+ scp <local-file> <remote-user>@<remote-host>:<remote-file>
+ ftpput <remote-host> <remote-file> <local-file>
+
+The logs may contain private information, and if you are at all
+worried about that, you should exit now, or you should explicitly
+exclude those logs from the archive.
+
+EOF
+}
+
+archive()
+{
+ local out="$1"
+ local files="$2"
+
+ tar -cfO $files | bzip2 -z -c > "$out"
+}
+
+save_file()
+{
+ local save_path="$1"
+ local save_file="$2"
+ local save_out="$3"
+
+ cd "$save_path"
+ archive "${base_path}/${save_out}.tar.bz2" $save_file > ${base_path}/${name}.log 2>&1
+ files="$files ${save_out}.tar.bz2"
+ cd - > /dev/null
+}
+
+save_out()
+{
+ local save_out_cmd="$1"
+ local save_out_out="$2"
+
+ $save_out_cmd > "${base_path}/${save_out_out}.log" 2>&1
+ files="$files ${save_out_out}.log"
+}
+
+bugtool_file()
+{
+ local base="$1"
+
+ cd "${base_path}"
+ archive "${saved_tarball}" "$files ${name}.log"
+ cd - > /dev/null
+ rm -rf "${base_path}"
+}
+
+welcome
+
+mkdir -p "${base_path}"
+save_file "/var/log" "messages*" "syslog"
+save_file "/config/vms" "*" "vms"
+save_file "/var/log" "xenstored-access*" "xenstored-access"
+save_file "/tmp" "xenmgr-xenvm*" "xenmgr-xenvm"
+save_out "dmesg" "dmesg"
+save_out "xenops dmesg" "xen_dmesg"
+save_out "dmidecode" "dmidecode"
+save_out "xenops list" "xenops_list"
+save_out "brctl show" "brctl_show"
+save_out "ifconfig" "ifconfig"
+bugtool_file "/tmp/$name/$name-$d"
+sync
+
+echo "Writing tarball ${saved_tarball} successful."