Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Jul 2012 19:02:56 +0000
From:      tzabal@FreeBSD.org
To:        svn-soc-all@FreeBSD.org
Subject:   socsvn commit: r239870 - soc2012/tzabal/client-side/akcrs-head/usr.sbin/crashreport
Message-ID:  <20120728190256.87932106566C@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tzabal
Date: Sat Jul 28 19:02:55 2012
New Revision: 239870
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=239870

Log:
  Minor changes and fix a bug related with the XML file of a textdump.

Modified:
  soc2012/tzabal/client-side/akcrs-head/usr.sbin/crashreport/crashreport.sh

Modified: soc2012/tzabal/client-side/akcrs-head/usr.sbin/crashreport/crashreport.sh
==============================================================================
--- soc2012/tzabal/client-side/akcrs-head/usr.sbin/crashreport/crashreport.sh	Sat Jul 28 16:30:50 2012	(r239869)
+++ soc2012/tzabal/client-side/akcrs-head/usr.sbin/crashreport/crashreport.sh	Sat Jul 28 19:02:55 2012	(r239870)
@@ -175,23 +175,23 @@
 echo "<crashreport>" >> ${data}
 echo "<header>" >> ${data}
 
+echo "<email>" >> ${data}
+echo "${_email}" >> ${data}
+echo "</email>" >> ${data}
+
 echo "<type>" >> ${data}
 output=`file "${_dumpdir}/${_file}"`
 if echo "${output}" | grep 'POSIX tar archive' > /dev/null; then
-	type='textdump'
+        type='textdump'
 elif echo "${output}" | grep 'text' > /dev/null; then
-	type='vmcore'
+        type='vmcore'
 else
-	error 'Unknown type of debugging information.'
-	exit 1
+        error 'Unknown type of debugging information.'
+        exit 1
 fi
 echo "${type}" >> ${data}
 echo "</type>" >> ${data}
 
-echo "<email>" >> ${data}
-echo "${_email}" >> ${data}
-echo "</email>" >> ${data}
-
 echo "</header>" >> ${data}
 echo "<body>" >> ${data}
 
@@ -283,14 +283,14 @@
 	if [ -f "${tmp_dir}/ddb.txt" ]; then
 		flag='false'
 		while read line; do
-			echo "${line}" | egrep '^.+>  [a-z ]+$' > /dev/null
+			echo "${line}" | egrep '^.+> [a-z ]+$' > /dev/null
 			if [ $? -eq 0 ]; then
 				if [ "${flag}" == false ]; then
 					flag='true'
 					echo "<command>" >> ${data}
 					echo "<name>" >> ${data}
 					echo "${line}" | \
-					 sed -E 's/^.+>  ([a-z ]+)$/\1/' >> ${data}
+					 sed -E 's/^.+> ([a-z ]+)$/\1/' >> ${data}
 					echo "</name>" >> ${data}
 					echo "<result>" >> ${data}
 				else
@@ -299,7 +299,7 @@
 					echo "<command>" >> ${data}
 					echo "<name>" >> ${data}
 					echo "${line}" | \
-					 sed -E 's/^.+>  ([a-z ]+)$/\1/' >> ${data}
+					 sed -E 's/^.+> ([a-z ]+)$/\1/' >> ${data}
 					echo "</name>" >> ${data}
 					echo "<result>" >> ${data}
 				fi



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120728190256.87932106566C>