More fixes for quota format on FreeBSD 9.
Obtained from: remko Feature safe: yes
This commit is contained in:
parent
472db75cdc
commit
b77961575a
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=293186
@ -7,7 +7,7 @@
|
||||
|
||||
PORTNAME= webmin
|
||||
PORTVERSION= 1.580
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= sysutils
|
||||
MASTER_SITES= http://download.webmin.com/updates/:up \
|
||||
SF/webadmin/${PORTNAME}/${PORTVERSION}:sf \
|
||||
|
@ -3,7 +3,28 @@ $FreeBSD$
|
||||
|
||||
--- quota/freebsd-lib.pl.orig
|
||||
+++ quota/freebsd-lib.pl
|
||||
@@ -240,11 +240,17 @@
|
||||
@@ -152,7 +152,9 @@
|
||||
if (/^(\S+)$/) {
|
||||
# Bogus wrapped line
|
||||
$filesys{$n,'filesys'} = $1;
|
||||
- <QUOTA>=~/^.{15}(.{8}).(.{7})(.{8}).{8}(.{8}).(.{7})(.{8})/;
|
||||
+ local $nl = <QUOTA>;
|
||||
+ $nl =~ /^\s+(\S+)\s+(\S+)\s+(\S+)(.{8}\s+)(\S+)\s+(\S+)\s+(\S+)(.*)/ ||
|
||||
+ $nl =~ /^.{15}(.{8}).(.{7})(.{8}).{8}(.{8}).(.{7})(.{8})/;
|
||||
$filesys{$n,'ublocks'} = int($1);
|
||||
$filesys{$n,'sblocks'} = int($2);
|
||||
$filesys{$n,'hblocks'} = int($3);
|
||||
@@ -161,7 +163,8 @@
|
||||
$filesys{$n,'hfiles'} = int($6);
|
||||
$n++;
|
||||
}
|
||||
- elsif (/^(.{15})(.{8}).(.{7})(.{8}).{8}(.{8}).(.{7})(.{8})/) {
|
||||
+ elsif (/^\s*(\S+)\s+(\S+)\s+(\S+)\s+(\S+)(.{8}\s+)(\S+)\s+(\S+)\s+(\S+)(.*)/ ||
|
||||
+ /^(.{15})(.{8}).(.{7})(.{8}).{8}(.{8}).(.{7})(.{8})/) {
|
||||
$filesys{$n,'ublocks'} = int($2);
|
||||
$filesys{$n,'sblocks'} = int($3);
|
||||
$filesys{$n,'hblocks'} = int($4);
|
||||
@@ -240,11 +243,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]) {
|
||||
|
Loading…
Reference in New Issue
Block a user