aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/webmin
diff options
context:
space:
mode:
authorolgeni <olgeni@FreeBSD.org>2012-02-14 06:49:30 +0800
committerolgeni <olgeni@FreeBSD.org>2012-02-14 06:49:30 +0800
commitde8e7f9f8f53154872a32f928f61653c25826b06 (patch)
tree3955fcf8a12cf1c29f9342c4372242a471b15b23 /sysutils/webmin
parent772fcd15d63ae13c44c042ffc36f490ab7ae3703 (diff)
downloadfreebsd-ports-gnome-de8e7f9f8f53154872a32f928f61653c25826b06.tar.gz
freebsd-ports-gnome-de8e7f9f8f53154872a32f928f61653c25826b06.tar.zst
freebsd-ports-gnome-de8e7f9f8f53154872a32f928f61653c25826b06.zip
Fix quota support on FreeBSD 9.
Obtained from: remko
Diffstat (limited to 'sysutils/webmin')
-rw-r--r--sysutils/webmin/Makefile1
-rw-r--r--sysutils/webmin/files/patch-quota_freebsd-lib.pl24
2 files changed, 25 insertions, 0 deletions
diff --git a/sysutils/webmin/Makefile b/sysutils/webmin/Makefile
index bc2d1e11da88..19398a17c1c9 100644
--- a/sysutils/webmin/Makefile
+++ b/sysutils/webmin/Makefile
@@ -7,6 +7,7 @@
PORTNAME= webmin
PORTVERSION= 1.580
+PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= http://download.webmin.com/updates/:up \
SF/webadmin/${PORTNAME}/${PORTVERSION}:sf \
diff --git a/sysutils/webmin/files/patch-quota_freebsd-lib.pl b/sysutils/webmin/files/patch-quota_freebsd-lib.pl
new file mode 100644
index 000000000000..b34984c8742e
--- /dev/null
+++ b/sysutils/webmin/files/patch-quota_freebsd-lib.pl
@@ -0,0 +1,24 @@
+
+$FreeBSD$
+
+--- quota/freebsd-lib.pl.orig
++++ quota/freebsd-lib.pl
+@@ -240,11 +240,17 @@
+ @line = split(/\n/, $_[0]);
+ for($i=0; $i<@line; $i++) {
+ if ($line[$i] =~ /^(\S+): (blocks|kbytes) in use: (\d+), limits \(soft = (\d+), hard = (\d+)\)$/ && $1 eq $_[1]) {
+- # found lines to change
++ # found lines to change, old style
+ $rv .= "$1: $2 in use: $3, limits (soft = $_[2], hard = $_[3])\n";
+ $line[++$i] =~ /^\s*inodes in use: (\d+), limits \(soft = (\d+), hard = (\d+)\)$/;
+ $rv .= "\tinodes in use: $1, limits (soft = $_[4], hard = $_[5])\n";
+ }
++ elsif ($line[$i] =~ /^(\S+): in use: (\d+)k, limits \(soft = (\d+)k, hard = (\d+)k\)$/ && $1 eq $_[1]) {
++ # found lines to change, new style
++ $rv .= "$1: in use: ${2}k, limits (soft = $_[2]k, hard = $_[3]k)\n";
++ $line[++$i] =~ /^\s*inodes in use: (\d+), limits \(soft = (\d+), hard = (\d+)\)$/;
++ $rv .= "\tinodes in use: $1, limits (soft = $_[4], hard = $_[5])\n";
++ }
+ else { $rv .= "$line[$i]\n"; }
+ }
+ return $rv;