~ubuntu-branches/ubuntu/vivid/xymon/vivid-proposed

« back to all changes in this revision

Viewing changes to debian/patches/hobbitclient-tmpfs

  • Committer: Bazaar Package Importer
  • Author(s): Christoph Berg
  • Date: 2010-04-09 00:17:03 UTC
  • Revision ID: james.westby@ubuntu.com-20100409001703-4646jk1a2tvt00qd
Tags: 4.3.0~beta2.dfsg-6
* Support GNU/kFreeBSD by adding a Makefile and a config snippet that
  pretends we are running on Linux. (Closes: #458417)
* Tweak hobbitclient-linux.sh to report 'df' data without /proc/filesystems
  mounted.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
xymon (4.3.0~beta2.dfsg-6) unstable; urgency=low
 
2
 
 
3
  * Support GNU/kFreeBSD by adding a Makefile and a config snippet that
 
4
    pretends we are running on Linux. (Closes: #458417)
 
5
  * Tweak hobbitclient-linux.sh to report 'df' data without /proc/filesystems
 
6
    mounted.
 
7
 
 
8
 -- Christoph Berg <myon@debian.org>  Fri, 09 Apr 2010 00:17:03 +0200
 
9
 
1
10
hobbit (4.2.0.dfsg-13) unstable; urgency=low
2
11
 
3
12
  * Do not ignore tmpfs mountpoints in hobbitclient-linux.sh, but add
8
17
 
9
18
--- a/client/hobbitclient-linux.sh
10
19
+++ b/client/hobbitclient-linux.sh
11
 
@@ -42,7 +42,7 @@ uptime
 
20
@@ -42,8 +42,13 @@ uptime
12
21
 echo "[who]"
13
22
 who
14
23
 echo "[df]"
15
24
-EXCLUDES=`cat /proc/filesystems | grep nodev | awk '{print $2}' | xargs echo | sed -e 's! ! -x !g'`
16
 
+EXCLUDES=`cat /proc/filesystems | grep nodev | grep -v tmpfs | awk '{print $2}' | xargs echo | sed -e 's! ! -x !g'`
17
 
 df -Pl -x iso9660 -x $EXCLUDES | sed -e '/^[^  ][^     ]*$/{
 
25
-df -Pl -x iso9660 -x $EXCLUDES | sed -e '/^[^  ][^     ]*$/{
 
26
+if test -f /proc/filesystems ; then # Linux
 
27
+       EXCLUDES=`cat /proc/filesystems | grep nodev | grep -v tmpfs | awk '{print $2}' | xargs echo | sed -e 's! ! -x !g'`
 
28
+else # kfreebsd (or /proc not mounted)
 
29
+       EXCLUDES=`mount | grep -v '^/' | grep -v tmpfs | awk '{print $1}' | xargs echo | sed -e 's! ! -x !g'`
 
30
+fi
 
31
+# kfreebsd needs an extra grep -v
 
32
+df -Pl -x iso9660 -x $EXCLUDES | grep -v '^/sys' | sed -e '/^[^        ][^     ]*$/{
18
33
 N
19
34
 s/[    ]*\n[   ]*/ /
 
35
 }'
20
36
--- a/hobbitd/etcfiles/hobbit-clients.cfg
21
37
+++ b/hobbitd/etcfiles/hobbit-clients.cfg
22
38
@@ -347,6 +347,10 @@