socsvn commit: r239870 - soc2012/tzabal/client-side/akcrs-head/usr.sbin/crashreport

tzabal at FreeBSD.org tzabal at FreeBSD.org
Sat Jul 28 19:02:58 UTC 2012


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


More information about the svn-soc-all mailing list