Richard W.M. Jones
2010-Aug-23 22:00 UTC
[Libguestfs] [PATCH] Don't print debug messages when not in verbose mode.
-- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://et.redhat.com/~rjones/virt-df/ -------------- next part -------------->From 6ba747fd75c1c6ef7bb0076540719d38fdc6a643 Mon Sep 17 00:00:00 2001From: Richard Jones <rjones at redhat.com> Date: Mon, 23 Aug 2010 22:58:51 +0100 Subject: [PATCH] Don't print debug messages when not in verbose mode. Don't print them because no one's listening ... --- appliance/init | 32 +++++++++++++++++--------------- 1 files changed, 17 insertions(+), 15 deletions(-) diff --git a/appliance/init b/appliance/init index b8133ca..6aeea0c 100755 --- a/appliance/init +++ b/appliance/init @@ -69,21 +69,23 @@ for f in /sys/block/vd*/queue/rotational; do echo 1 > $f; done # http://kbase.redhat.com/faq/docs/DOC-5428 for f in /sys/block/[hsv]d*/queue/scheduler; do echo noop > $f; done -# Keep these to enhance the usefulness of debug output. -ls -l /dev -cat /proc/mounts -lvm pvs -lvm vgs -lvm lvs -ifconfig -netstat -rn -lsmod -#hwclock -r -date -#ping -n -v -c 5 10.0.2.2 -#ping -n -v -c 5 10.0.2.4 - -echo -n "uptime: "; cat /proc/uptime +# These are useful when debugging. +if grep -sq guestfs_verbose=1 /proc/cmdline; then + ls -l /dev + cat /proc/mounts + lvm pvs + lvm vgs + lvm lvs + ifconfig + netstat -rn + lsmod + #hwclock -r + date + #ping -n -v -c 5 10.0.2.2 + #ping -n -v -c 5 10.0.2.4 + + echo -n "uptime: "; cat /proc/uptime +fi if ! grep -sq guestfs_rescue=1 /proc/cmdline; then exec guestfsd -f -- 1.7.2.1
Matthew Booth
2010-Aug-24 09:30 UTC
[Libguestfs] [PATCH] Don't print debug messages when not in verbose mode.
On 23/08/10 23:00, Richard W.M. Jones wrote:>> From 6ba747fd75c1c6ef7bb0076540719d38fdc6a643 Mon Sep 17 00:00:00 2001 > From: Richard Jones<rjones at redhat.com> > Date: Mon, 23 Aug 2010 22:58:51 +0100 > Subject: [PATCH] Don't print debug messages when not in verbose mode. > > Don't print them because no one's listening ... > --- > appliance/init | 32 +++++++++++++++++--------------- > 1 files changed, 17 insertions(+), 15 deletions(-)ACK. Matt -- Matthew Booth, RHCA, RHCSS Red Hat Engineering, Virtualisation Team GPG ID: D33C3490 GPG FPR: 3733 612D 2D05 5458 8A8A 1600 3441 EA19 D33C 3490