Fix user quota display on Solaris
authorJamie Cameron <jcameron@webmin.com>
Sat, 30 Aug 2008 06:50:42 +0000 (06:50 +0000)
committerJamie Cameron <jcameron@webmin.com>
Sat, 30 Aug 2008 06:50:42 +0000 (06:50 +0000)
quota/solaris-lib.pl

index b08256b..91bf1ad 100755 (executable)
@@ -172,7 +172,7 @@ $n=0; while(<QUOTA>) {
                # Bogus wrapped line!
                $filesys{$n,'filesys'} = $1;
                local $nl = <QUOTA>;
-               if ($nl =~ /^\s+(\d+)\s+(\d+)\s+(\d+)\s(.{0,15})\s(\d+)\s+(\d+)\s+(\d+)(.*)/ || $nl =~ /^.{13}(.{7})(.{7})(.{7})(.{12})(.{7})(.{7})(.{7})(.*)/) {
+               if ($nl =~ /^\s+(\d+)\s+(\d+)\s+(\d+)\s(.{0,15})\s+(\d+)\s+(\d+)\s+(\d+)(.*)/ || $nl =~ /^.{13}(.{7})(.{7})(.{7})(.{12})(.{7})(.{7})(.{7})(.*)/) {
                        $filesys{$n,'ublocks'} = int($1);
                        $filesys{$n,'sblocks'} = int($2);
                        $filesys{$n,'hblocks'} = int($3);
@@ -186,7 +186,7 @@ $n=0; while(<QUOTA>) {
                        $n++;
                        }
                }
-       elsif (/^(\S+)\s+(\d+)\s+(\d+)\s+(\d+)\s(.{0,15})\s(\d+)\s+(\d+)\s+(\d+)(.*)/ || /^(.{13})(.{7})(.{7})(.{7})(.{12})(.{7})(.{7})(.{7})(.*)/) {
+       elsif (/^(\S+)\s+(\d+)\s+(\d+)\s+(\d+)\s(.{0,15})\s+(\d+)\s+(\d+)\s+(\d+)(.*)/ || /^(.{13})(.{7})(.{7})(.{7})(.{12})(.{7})(.{7})(.{7})(.*)/) {
                $filesys{$n,'filesys'} = $1;
                $filesys{$n,'ublocks'} = int($2);
                $filesys{$n,'sblocks'} = int($3);