aboutsummaryrefslogtreecommitdiff
path: root/handlers
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2012-06-11 10:07:53 -0400
committerMicah Anderson <micah@riseup.net>2012-06-11 10:07:53 -0400
commit1eabbe5de7f1b583ab4f0301646a2108122602b4 (patch)
tree7b5796d53f913b7da05cf01c9e0dbcdcc3881d38 /handlers
parentf8e69f738e6887fcc3f2eaf203c123a10534a0c0 (diff)
downloadbackupninja-1eabbe5de7f1b583ab4f0301646a2108122602b4.tar.gz
backupninja-1eabbe5de7f1b583ab4f0301646a2108122602b4.tar.bz2
dont run lspci and modinfo when hwinfo==no
Diffstat (limited to 'handlers')
-rw-r--r--handlers/sys.in24
1 files changed, 14 insertions, 10 deletions
diff --git a/handlers/sys.in b/handlers/sys.in
index 74133a3..92998cc 100644
--- a/handlers/sys.in
+++ b/handlers/sys.in
@@ -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."