diff options
author | Pav Lucistnik <pav@FreeBSD.org> | 2007-12-14 16:54:24 +0000 |
---|---|---|
committer | Pav Lucistnik <pav@FreeBSD.org> | 2007-12-14 16:54:24 +0000 |
commit | 1123329b7cb15474f8ad5b8ab5eded79ff342353 (patch) | |
tree | 71f7ed15a8302c12c0a50c9c41a0d988f6fe4255 /sysutils/pydf/files | |
parent | d644ec35d177c8a247897ffebde1f0813620a56f (diff) |
Notes
Diffstat (limited to 'sysutils/pydf/files')
-rw-r--r-- | sysutils/pydf/files/patch-pydf | 47 | ||||
-rw-r--r-- | sysutils/pydf/files/pkg-message.in | 8 |
2 files changed, 55 insertions, 0 deletions
diff --git a/sysutils/pydf/files/patch-pydf b/sysutils/pydf/files/patch-pydf new file mode 100644 index 000000000000..0a216915da50 --- /dev/null +++ b/sysutils/pydf/files/patch-pydf @@ -0,0 +1,47 @@ +--- pydf.original Tue Dec 4 23:02:26 2007 ++++ pydf Tue Dec 4 23:02:14 2007 +@@ -1,4 +1,4 @@ +-#! /usr/bin/python ++#! %%PYTHON_CMD%% + + import sys, os, string, types, commands, struct + from optparse import OptionParser +@@ -166,7 +166,7 @@ + #end of default definitions + + # read configuration file +-for i in ["/etc/pydfrc", os.environ['HOME']+"/.pydfrc"]: ++for i in ["%%PREFIX%%/etc/pydfrc", os.environ['HOME']+"/.pydfrc"]: + if os.path.isfile(i): + execfile(i) + +@@ -336,9 +336,9 @@ + except OSError, IOError: + status = 10*[0] + +- fs_blocksize = status[F_BSIZE] ++ fs_blocksize = status[F_FRSIZE] + if fs_blocksize == 0: +- fs_blocksize = status[F_FRSIZE] ++ fs_blocksize = status[F_BSIZE] + free = status[F_BFREE] + used = long(status[F_BLOCKS]-free) + size = status[F_BLOCKS] +@@ -351,7 +351,7 @@ + avail_f = myformat(avail, sizeformat, fs_blocksize) + + try: +- perc = round(100.*used/size, 1) ++ perc = round(100.*used/(avail+used), 1) + except ZeroDivisionError: + perc = 0 + perc_f = str(perc) +@@ -419,7 +419,7 @@ + "test if fs (as type) is a special one" + "in addition, a filesystem is special if it has number of blocks equal to 0" + fs = fs.lower() +- return fs in [ "tmpfs", "devpts", "proc", "sysfs", "usbfs" ] ++ return fs in [ "tmpfs", "devpts", "proc", "sysfs", "usbfs", "procfs", "devfs" ] + + + diff --git a/sysutils/pydf/files/pkg-message.in b/sysutils/pydf/files/pkg-message.in new file mode 100644 index 000000000000..f20a9967c977 --- /dev/null +++ b/sysutils/pydf/files/pkg-message.in @@ -0,0 +1,8 @@ + +========================================================= + +Please copy the file %%PREFIX%%/etc/pydfrc.sample +to %%PREFIX%%/etc/pydfrc and edit your configuration. + +========================================================= + |