All of lore.kernel.org
 help / color / mirror / Atom feed
* lvmdump capture logs in debian/ubuntu
@ 2013-01-15 17:20 Eduardo Damato
  0 siblings, 0 replies; only message in thread
From: Eduardo Damato @ 2013-01-15 17:20 UTC (permalink / raw)
  To: lvm-devel


Hi All,

lvmdump is not capturing the logs on Ubuntu/debian systems, proposing
the patch below.

Cheers,
Eduardo.

$ git diff
diff --git a/scripts/lvmdump.sh b/scripts/lvmdump.sh
index 641d109..2f62b95 100755
--- a/scripts/lvmdump.sh
+++ b/scripts/lvmdump.sh
@@ -201,7 +201,13 @@ myecho "Gathering process info..."
 log "$PS alx >> \"$dir/ps_info\" 2>> \"$log\""
 
 myecho "Gathering console messages..."
-log "$TAIL -n 75 /var/log/messages >> \"$dir/messages\" 2>> \"$log\""
+if [ -f /var/log/messages ]
+then
+       log "$TAIL -n 75 /var/log/messages >> \"$dir/messages\" 2>>
\"$log\""
+elif [ -f /var/log/syslog ]
+then
+       log "$TAIL -n 75 /var/log/syslog >> \"$dir/messages\" 2>> \"$log\""
+fi
 
 myecho "Gathering /etc/lvm info..."
 log "$CP -a /etc/lvm \"$dir/lvm\" 2>> \"$log\""



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-01-15 17:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-15 17:20 lvmdump capture logs in debian/ubuntu Eduardo Damato

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.