[vhffs-dev] [svn] commit: r173 - /trunk/vhffs-robots/src/fix_quota.pl |
[ Thread Index |
Date Index
| More vhffs.org/vhffs-dev Archives
]
Author: jd
Date: Fri Mar 17 17:57:19 2006
New Revision: 173
Log:
user another method 'cause the api is f****
Modified:
trunk/vhffs-robots/src/fix_quota.pl
Modified: trunk/vhffs-robots/src/fix_quota.pl
==============================================================================
--- trunk/vhffs-robots/src/fix_quota.pl (original)
+++ trunk/vhffs-robots/src/fix_quota.pl Fri Mar 17 17:57:19 2006
@@ -35,19 +35,19 @@
}
}
-$groups = Vhffs::Group::getall( $vhffs , Vhffs::Constants::WAITING_FOR_VALIDATION );
+$users = Vhffs::User::getall( $vhffs , Vhffs::Constants::ACTIVATED );
-foreach $group ( @{$groups} )
+foreach $user ( @{$users} )
{
- if( $group->fetch > 0 )
+ if( $user->fetch > 0 )
{
$blocks = 1024;
$inodes = 1126400 / 100;
if( -x "/usr/sbin/setquota" )
{
- $cmd = "/usr/sbin/setquota -g ".$group->get_gid ." ".$blocks." ".$blocks." ".$inodes." ".$inodes." -a ".$vhffs->get_config->get_datadir;
+ $cmd = "/usr/sbin/setquota -g ".$user->get_gid ." ".$blocks." ".$blocks." ".$inodes." ".$inodes." -a ".$vhffs->get_config->get_datadir;
system( $cmd );
- Vhffs::Robots::vhffs_log( sprintf( "Update quota for user group %s set %s" , $group->get_groupname , $group->get_quota ) );
+ Vhffs::Robots::vhffs_log( sprintf( "Update quota for user group %s set 1" , $user->get_groupname ) );
}
}
}