]> gitweb.fluxo.info Git - backupninja.git/commitdiff
dont run lspci and modinfo when hwinfo==no
authorMicah Anderson <micah@riseup.net>
Mon, 11 Jun 2012 14:07:53 +0000 (10:07 -0400)
committerMicah Anderson <micah@riseup.net>
Mon, 11 Jun 2012 14:07:53 +0000 (10:07 -0400)
ChangeLog
handlers/sys.in

index faf06dd56ad79ba22ae4474cd5ccf51efcd2f5bb..f2e2b7ccda6ac61bab17c539b8c84603a566b384 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,8 @@ version 1.0 -- UNRELEASED
           (Closes: #673572)
     backupninja changes
         . Make it clear what lockfile could not be acquired, if any.
+       sys:
+        . Don't execute /usr/bin/lspci or /sbin/modinfo when $hardware == "no"
 
 version 1.0-rc1 -- May 15, 2012
     handler changes
index 74133a3765ebd242cc4628f415ad5b4cb1b0da03..92998cc476b4610c1fb8daf656a1569bf2ec4fe9 100644 (file)
@@ -348,13 +348,15 @@ echo "Getting information about the kernel."
 echo
 STATUS="Getting kernel version:"
 catifexec "/bin/uname" "-a"
-STATUS="Checking module information:"
-catifexec "/sbin/lsmod"
-for x  in $(/sbin/lsmod | /usr/bin/cut -f1 -d" " 2>/dev/null | /bin/grep -v Module 2>/dev/null
-) ; do
-   STATUS="Checking module information $x:"
-   catifexec "/sbin/modinfo" "$x"
-done
+if [ "$hardware" == "yes" ]; then
+   STATUS="Checking module information:"
+   catifexec "/sbin/lsmod"
+   for x  in $(/sbin/lsmod | /usr/bin/cut -f1 -d" " 2>/dev/null | /bin/grep -v Module 2>/dev/null
+   ) ; do
+      STATUS="Checking module information $x:"
+      catifexec "/sbin/modinfo" "$x"
+   done
+fi
 
 STATUS="Gathering information about your filesystems:"
 catiffile "/proc/filesystems"
@@ -432,9 +434,11 @@ catiffile "/proc/rtc"
 STATUS="Gathering information about your ide drivers:"
 catiffile "/proc/ide"
 
-STATUS="Gathering information about your bus:"
-catifexec "/usr/bin/lspci"
-catiffile "/proc/bus"
+if [ "$hardware" == "yes" ]; then
+   STATUS="Gathering information about your bus:"
+   catifexec "/usr/bin/lspci"
+   catiffile "/proc/bus"
+fi
 
 echo
 echo "Getting disk and filesystem information."