do not show duplicate devices for quota
This commit is contained in:
parent
9422d9d678
commit
516a6b7654
|
@ -1,10 +1,8 @@
|
||||||
#! /usr/bin/perl
|
#! /usr/bin/perl
|
||||||
|
|
||||||
# $Id$
|
|
||||||
#
|
|
||||||
# This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
# This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
||||||
# Copyright (C) 2003 - 2006 Tilo Lutz
|
# Copyright (C) 2003 - 2006 Tilo Lutz
|
||||||
# Copyright (C) 2006 - 2015 Roland Gruber
|
# Copyright (C) 2006 - 2018 Roland Gruber
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@ -70,11 +68,17 @@ sub get_fs { # Load mountpoints from mtab if enabled quotas
|
||||||
Quota::setmntent();
|
Quota::setmntent();
|
||||||
my $i=0;
|
my $i=0;
|
||||||
my @args;
|
my @args;
|
||||||
|
my %deviceList;
|
||||||
while (my @temp = Quota::getmntent()) {
|
while (my @temp = Quota::getmntent()) {
|
||||||
|
if (exists($deviceList{$temp[0]})) {
|
||||||
|
# skip duplicate devices
|
||||||
|
next;
|
||||||
|
}
|
||||||
$args[$i][0] = $temp[0];
|
$args[$i][0] = $temp[0];
|
||||||
$args[$i][1] = $temp[1];
|
$args[$i][1] = $temp[1];
|
||||||
$args[$i][2] = $temp[2];
|
$args[$i][2] = $temp[2];
|
||||||
$args[$i][3] = $temp[3];
|
$args[$i][3] = $temp[3];
|
||||||
|
$deviceList{$temp[0]} = 1;
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
Quota::endmntent();
|
Quota::endmntent();
|
||||||
|
|
Loading…
Reference in New Issue