[vhffs-dev] [2041] Vhffs::Robots:: vhffs_log arguments switched in order to be normalised with other methods |
[ Thread Index |
Date Index
| More vhffs.org/vhffs-dev Archives
]
Revision: 2041
Author: gradator
Date: 2012-02-23 01:36:01 +0100 (Thu, 23 Feb 2012)
Log Message:
-----------
Vhffs::Robots::vhffs_log arguments switched in order to be normalised with other methods
Modified Paths:
--------------
trunk/vhffs-api/src/Vhffs/Robots/Group.pm
trunk/vhffs-api/src/Vhffs/Robots/Repository.pm
trunk/vhffs-api/src/Vhffs/Robots/User.pm
trunk/vhffs-api/src/Vhffs/Robots.pm
trunk/vhffs-robots/src/bazaar_create.pl
trunk/vhffs-robots/src/bazaar_delete.pl
trunk/vhffs-robots/src/bazaar_public.pl
trunk/vhffs-robots/src/cron_create.pl
trunk/vhffs-robots/src/cron_delete.pl
trunk/vhffs-robots/src/cvs_create.pl
trunk/vhffs-robots/src/cvs_delete.pl
trunk/vhffs-robots/src/cvs_public.pl
trunk/vhffs-robots/src/dns_create.pl
trunk/vhffs-robots/src/dns_delete.pl
trunk/vhffs-robots/src/git_create.pl
trunk/vhffs-robots/src/git_delete.pl
trunk/vhffs-robots/src/git_public.pl
trunk/vhffs-robots/src/group_create.pl
trunk/vhffs-robots/src/group_delete.pl
trunk/vhffs-robots/src/group_quota.pl
trunk/vhffs-robots/src/mail_create.pl
trunk/vhffs-robots/src/mail_delete.pl
trunk/vhffs-robots/src/mailinglist_create.pl
trunk/vhffs-robots/src/mailinglist_delete.pl
trunk/vhffs-robots/src/mercurial_create.pl
trunk/vhffs-robots/src/mercurial_delete.pl
trunk/vhffs-robots/src/mercurial_public.pl
trunk/vhffs-robots/src/mysql_create.pl
trunk/vhffs-robots/src/mysql_delete.pl
trunk/vhffs-robots/src/mysql_modify.pl
trunk/vhffs-robots/src/object_cleanup.pl
trunk/vhffs-robots/src/pgsql_create.pl
trunk/vhffs-robots/src/pgsql_delete.pl
trunk/vhffs-robots/src/repository_create.pl
trunk/vhffs-robots/src/repository_delete.pl
trunk/vhffs-robots/src/repository_quota.pl
trunk/vhffs-robots/src/svn_create.pl
trunk/vhffs-robots/src/svn_delete.pl
trunk/vhffs-robots/src/svn_public.pl
trunk/vhffs-robots/src/user_cleanup.pl
trunk/vhffs-robots/src/user_create.pl
trunk/vhffs-robots/src/user_delete.pl
trunk/vhffs-robots/src/user_group.pl
trunk/vhffs-robots/src/user_quota.pl
trunk/vhffs-robots/src/web_create.pl
trunk/vhffs-robots/src/web_delete.pl
Modified: trunk/vhffs-api/src/Vhffs/Robots/Group.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Robots/Group.pm 2012-02-23 00:06:09 UTC (rev 2040)
+++ trunk/vhffs-api/src/Vhffs/Robots/Group.pm 2012-02-23 00:36:01 UTC (rev 2041)
@@ -92,7 +92,7 @@
rmdir $dir;
if(@$errors) {
- Vhffs::Robots::vhffs_log( sprintf( 'Something went wrong during %s group deletion: %s', $group->get_groupname, join(', ', @$errors) ) );
+ Vhffs::Robots::vhffs_log( $main, sprintf( 'Something went wrong during %s group deletion: %s', $group->get_groupname, join(', ', @$errors) ) );
}
}
return 0;
Modified: trunk/vhffs-api/src/Vhffs/Robots/Repository.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Robots/Repository.pm 2012-02-23 00:06:09 UTC (rev 2040)
+++ trunk/vhffs-api/src/Vhffs/Robots/Repository.pm 2012-02-23 00:36:01 UTC (rev 2041)
@@ -73,7 +73,7 @@
File::Path::remove_tree( $repo->get_dir, { error => \my $errors });
if(@$errors) {
- Vhffs::Robots::vhffs_log( sprintf( 'Something went wrong during %s download repository deletion: %s', $repo->get_name, join(', ', @$errors) ) );
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( 'Something went wrong during %s download repository deletion: %s', $repo->get_name, join(', ', @$errors) ) );
}
# remove the link in group directory
Modified: trunk/vhffs-api/src/Vhffs/Robots/User.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Robots/User.pm 2012-02-23 00:06:09 UTC (rev 2040)
+++ trunk/vhffs-api/src/Vhffs/Robots/User.pm 2012-02-23 00:36:01 UTC (rev 2041)
@@ -81,7 +81,7 @@
rmdir $homedir;
if(@$errors) {
- Vhffs::Robots::vhffs_log( sprintf( 'Something went wrong during %s home deletion: %s', $user->get_username, join(', ', @$errors) ) );
+ Vhffs::Robots::vhffs_log( $main, sprintf( 'Something went wrong during %s home deletion: %s', $user->get_username, join(', ', @$errors) ) );
}
}
}
Modified: trunk/vhffs-api/src/Vhffs/Robots.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Robots.pm 2012-02-23 00:06:09 UTC (rev 2040)
+++ trunk/vhffs-api/src/Vhffs/Robots.pm 2012-02-23 00:36:01 UTC (rev 2041)
@@ -126,8 +126,8 @@
=cut
sub vhffs_log {
+ my $vhffs = shift;
my $message = shift;
- my $vhffs = shift;
return 1 unless defined $vhffs and defined $message;
my $robotconf = $vhffs->get_config->get_robots;
Modified: trunk/vhffs-robots/src/bazaar_create.pl
===================================================================
--- trunk/vhffs-robots/src/bazaar_create.pl 2012-02-23 00:06:09 UTC (rev 2040)
+++ trunk/vhffs-robots/src/bazaar_create.pl 2012-02-23 00:36:01 UTC (rev 2041)
@@ -48,9 +48,9 @@
foreach my $bazaar ( @{$repos} )
{
if( Vhffs::Robots::Bazaar::create_repo( $bazaar ) != 0 ) {
- Vhffs::Robots::vhffs_log( sprintf( 'Cannot create Bazaar %s' , $bazaar->get_reponame ), $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( 'Cannot create Bazaar %s' , $bazaar->get_reponame ));
} else {
- Vhffs::Robots::vhffs_log( sprintf( 'Created Bazaar %s' , $bazaar->get_reponame ), $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( 'Created Bazaar %s' , $bazaar->get_reponame ));
}
}
Modified: trunk/vhffs-robots/src/bazaar_delete.pl
===================================================================
--- trunk/vhffs-robots/src/bazaar_delete.pl 2012-02-23 00:06:09 UTC (rev 2040)
+++ trunk/vhffs-robots/src/bazaar_delete.pl 2012-02-23 00:36:01 UTC (rev 2041)
@@ -48,15 +48,15 @@
foreach my $bazaar ( @{$repos} )
{
if( Vhffs::Robots::Bazaar::delete_repo( $bazaar ) != 0 ) {
- Vhffs::Robots::vhffs_log( sprintf( 'Cannot delete files from Bazaar repository %s' , $bazaar->get_reponame ), $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( 'Cannot delete files from Bazaar repository %s' , $bazaar->get_reponame ));
} else {
- Vhffs::Robots::vhffs_log( sprintf( 'Delete files from Bazaar repository %s' , $bazaar->get_reponame ), $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( 'Delete files from Bazaar repository %s' , $bazaar->get_reponame ));
}
if( $bazaar->delete < 0 ) {
- Vhffs::Robots::vhffs_log( sprintf( 'Cannot delete Bazaar repository object %s' , $bazaar->get_reponame ), $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( 'Cannot delete Bazaar repository object %s' , $bazaar->get_reponame ));
} else {
- Vhffs::Robots::vhffs_log( sprintf( 'Delete Bazaar repository object %s' , $bazaar->get_reponame ), $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( 'Delete Bazaar repository object %s' , $bazaar->get_reponame ));
}
}
Modified: trunk/vhffs-robots/src/bazaar_public.pl
===================================================================
--- trunk/vhffs-robots/src/bazaar_public.pl 2012-02-23 00:06:09 UTC (rev 2040)
+++ trunk/vhffs-robots/src/bazaar_public.pl 2012-02-23 00:36:01 UTC (rev 2041)
@@ -49,10 +49,10 @@
{
if( $bazaar->is_public == 1 ) {
chmod 02775 , $bazaar->get_dir;
- Vhffs::Robots::vhffs_log( sprintf( 'Bazaar status %s is now public' , $bazaar->get_dir ) , $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( 'Bazaar status %s is now public' , $bazaar->get_dir ) );
} else {
chmod 02770 , $bazaar->get_dir;
- Vhffs::Robots::vhffs_log( sprintf( 'Bazaar status %s is now private' , $bazaar->get_dir ) , $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( 'Bazaar status %s is now private' , $bazaar->get_dir ) );
}
Vhffs::Robots::Bazaar::change_conf( $bazaar );
Modified: trunk/vhffs-robots/src/cron_create.pl
===================================================================
--- trunk/vhffs-robots/src/cron_create.pl 2012-02-23 00:06:09 UTC (rev 2040)
+++ trunk/vhffs-robots/src/cron_create.pl 2012-02-23 00:36:01 UTC (rev 2041)
@@ -55,12 +55,12 @@
$c->set_status( Vhffs::Constants::ACTIVATED );
if( $c->commit > 0 )
{
- Vhffs::Robots::vhffs_log( sprintf( 'Created cron job %s' , $c->get_cronpath ) , $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( 'Created cron job %s' , $c->get_cronpath ) );
$c->add_history( 'Robots activated this cron job' );
}
else
{
- Vhffs::Robots::vhffs_log( sprintf( 'Cannot create cron job %s' , $c->get_cronpath ) , $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( 'Cannot create cron job %s' , $c->get_cronpath ) );
}
}
Modified: trunk/vhffs-robots/src/cron_delete.pl
===================================================================
--- trunk/vhffs-robots/src/cron_delete.pl 2012-02-23 00:06:09 UTC (rev 2040)
+++ trunk/vhffs-robots/src/cron_delete.pl 2012-02-23 00:36:01 UTC (rev 2041)
@@ -47,7 +47,7 @@
foreach my $c ( @{$crons} )
{
- Vhffs::Robots::vhffs_log( sprintf( 'Deleted cron job %s' , $c->get_cronpath ) , $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( 'Deleted cron job %s' , $c->get_cronpath ) );
$c->delete;
}
Modified: trunk/vhffs-robots/src/cvs_create.pl
===================================================================
--- trunk/vhffs-robots/src/cvs_create.pl 2012-02-23 00:06:09 UTC (rev 2040)
+++ trunk/vhffs-robots/src/cvs_create.pl 2012-02-23 00:36:01 UTC (rev 2041)
@@ -48,11 +48,11 @@
{
if( Vhffs::Robots::Cvs::create_cvs( $c ) != 0 )
{
- Vhffs::Robots::vhffs_log( sprintf( 'CVS: repository %s is created' , $c->get_reponame ) , $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( 'CVS: repository %s is created' , $c->get_reponame ) );
}
else
{
- Vhffs::Robots::vhffs_log( sprintf( 'CVS: cannot create %s CVS repository' , $c->get_reponame ) , $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( 'CVS: cannot create %s CVS repository' , $c->get_reponame ) );
}
}
Modified: trunk/vhffs-robots/src/cvs_delete.pl
===================================================================
--- trunk/vhffs-robots/src/cvs_delete.pl 2012-02-23 00:06:09 UTC (rev 2040)
+++ trunk/vhffs-robots/src/cvs_delete.pl 2012-02-23 00:36:01 UTC (rev 2041)
@@ -48,15 +48,15 @@
foreach my $cvs ( @{$repos} )
{
if( Vhffs::Robots::Cvs::delete_cvs( $cvs ) != 0 ) {
- Vhffs::Robots::vhffs_log( sprintf( 'Cannot delete files from %s', $cvs->get_reponame ), $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( 'Cannot delete files from %s', $cvs->get_reponame ));
} else {
- Vhffs::Robots::vhffs_log( sprintf( 'Delete files from %s', $cvs->get_reponame ), $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( 'Delete files from %s', $cvs->get_reponame ));
}
if( $cvs->delete < 0 ) {
- Vhffs::Robots::vhffs_log( sprintf( 'Cannot delete CVS object %s', $cvs->get_reponame ), $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( 'Cannot delete CVS object %s', $cvs->get_reponame ));
} else {
- Vhffs::Robots::vhffs_log( sprintf( 'Delete CVS object %s', $cvs->get_reponame ), $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( 'Delete CVS object %s', $cvs->get_reponame ));
}
}
Modified: trunk/vhffs-robots/src/cvs_public.pl
===================================================================
--- trunk/vhffs-robots/src/cvs_public.pl 2012-02-23 00:06:09 UTC (rev 2040)
+++ trunk/vhffs-robots/src/cvs_public.pl 2012-02-23 00:36:01 UTC (rev 2041)
@@ -59,12 +59,12 @@
if( $cvs->is_public == 1 )
{
- Vhffs::Robots::vhffs_log( sprintf( 'CVS fixperm (public) for %s', $cvs->get_reponame ), $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( 'CVS fixperm (public) for %s', $cvs->get_reponame ));
$cvs->add_history('CVS is now public');
chmod 02775 , $cvs->get_dir;
# fix readers file
- Vhffs::Robots::vhffs_log( sprintf('CVS, put repository %s public' , $cvs->get_reponame), $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf('CVS, put repository %s public' , $cvs->get_reponame));
open( FILE , '>'.$readers_file ) or die( 'cannot open '.$readers_file );
print FILE 'anonymous'."\n";
close( FILE );
@@ -78,7 +78,7 @@
}
else
{
- Vhffs::Robots::vhffs_log( sprintf( 'CVS fixperm (private) for %s', $cvs->get_reponame ), $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( 'CVS fixperm (private) for %s', $cvs->get_reponame ));
$cvs->add_history('CVS is now private');
chmod 02770 , $cvs->get_dir;
Modified: trunk/vhffs-robots/src/dns_create.pl
===================================================================
--- trunk/vhffs-robots/src/dns_create.pl 2012-02-23 00:06:09 UTC (rev 2040)
+++ trunk/vhffs-robots/src/dns_create.pl 2012-02-23 00:36:01 UTC (rev 2041)
@@ -56,11 +56,11 @@
$dns->set_status( Vhffs::Constants::ACTIVATED );
if( $dns->commit > 0 )
{
- Vhffs::Robots::vhffs_log( sprintf( "Create domain %s" , $dns->get_domain ) , $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( "Create domain %s" , $dns->get_domain ) );
}
else
{
- Vhffs::Robots::vhffs_log( sprintf( "Cannot create domain %s" , $dns->get_domain ) , $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( "Cannot create domain %s" , $dns->get_domain ) );
}
}
Modified: trunk/vhffs-robots/src/dns_delete.pl
===================================================================
--- trunk/vhffs-robots/src/dns_delete.pl 2012-02-23 00:06:09 UTC (rev 2040)
+++ trunk/vhffs-robots/src/dns_delete.pl 2012-02-23 00:36:01 UTC (rev 2041)
@@ -51,11 +51,11 @@
{
if( $dns->delete > 0 )
{
- Vhffs::Robots::vhffs_log( sprintf( "Delete %s", $dns->get_domain ), $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( "Delete %s", $dns->get_domain ));
}
else
{
- Vhffs::Robots::vhffs_log( sprintf( "Cannot delete domain name %s", $dns->get_domain ), $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( "Cannot delete domain name %s", $dns->get_domain ));
}
}
}
Modified: trunk/vhffs-robots/src/git_create.pl
===================================================================
--- trunk/vhffs-robots/src/git_create.pl 2012-02-23 00:06:09 UTC (rev 2040)
+++ trunk/vhffs-robots/src/git_create.pl 2012-02-23 00:36:01 UTC (rev 2041)
@@ -49,9 +49,9 @@
foreach my $git ( @{$repos} )
{
if( Vhffs::Robots::Git::create_repo( $git ) != 0 ) {
- Vhffs::Robots::vhffs_log( sprintf( 'Cannot create GIT %s' , $git->get_reponame ), $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( 'Cannot create GIT %s' , $git->get_reponame ));
} else {
- Vhffs::Robots::vhffs_log( sprintf( 'Created GIT %s' , $git->get_reponame ), $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( 'Created GIT %s' , $git->get_reponame ));
}
}
Modified: trunk/vhffs-robots/src/git_delete.pl
===================================================================
--- trunk/vhffs-robots/src/git_delete.pl 2012-02-23 00:06:09 UTC (rev 2040)
+++ trunk/vhffs-robots/src/git_delete.pl 2012-02-23 00:36:01 UTC (rev 2041)
@@ -49,15 +49,15 @@
foreach my $git ( @{$repos} )
{
if( Vhffs::Robots::Git::delete_repo( $git ) != 0 ) {
- Vhffs::Robots::vhffs_log( sprintf( 'Cannot delete files from GIT repository %s' , $git->get_reponame ), $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( 'Cannot delete files from GIT repository %s' , $git->get_reponame ));
} else {
- Vhffs::Robots::vhffs_log( sprintf( 'Delete files from GIT repository %s' , $git->get_reponame ), $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( 'Delete files from GIT repository %s' , $git->get_reponame ));
}
if( $git->delete < 0 ) {
- Vhffs::Robots::vhffs_log( sprintf( 'Cannot delete GIT repository object %s' , $git->get_reponame ), $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( 'Cannot delete GIT repository object %s' , $git->get_reponame ));
} else {
- Vhffs::Robots::vhffs_log( sprintf( 'Delete GIT repository object %s' , $git->get_reponame ), $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( 'Delete GIT repository object %s' , $git->get_reponame ));
}
}
Modified: trunk/vhffs-robots/src/git_public.pl
===================================================================
--- trunk/vhffs-robots/src/git_public.pl 2012-02-23 00:06:09 UTC (rev 2040)
+++ trunk/vhffs-robots/src/git_public.pl 2012-02-23 00:36:01 UTC (rev 2041)
@@ -50,10 +50,10 @@
{
if( $git->is_public == 1 ) {
chmod 02775 , $git->get_dir;
- Vhffs::Robots::vhffs_log( sprintf( 'GIT status %s is now public' , $git->get_dir ) , $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( 'GIT status %s is now public' , $git->get_dir ) );
} else {
chmod 02770 , $git->get_dir;
- Vhffs::Robots::vhffs_log( sprintf( 'GIT status %s is now private' , $git->get_dir ) , $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( 'GIT status %s is now private' , $git->get_dir ) );
}
Vhffs::Robots::Git::change_conf( $git );
Modified: trunk/vhffs-robots/src/group_create.pl
===================================================================
--- trunk/vhffs-robots/src/group_create.pl 2012-02-23 00:06:09 UTC (rev 2040)
+++ trunk/vhffs-robots/src/group_create.pl 2012-02-23 00:36:01 UTC (rev 2041)
@@ -52,11 +52,11 @@
{
if( defined Vhffs::Robots::Group::create_groupdir( $vhffs , $group ) )
{
- Vhffs::Robots::vhffs_log( sprintf( "create group %s " , $group->get_groupname ) , $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( "create group %s " , $group->get_groupname ) );
}
else
{
- Vhffs::Robots::vhffs_log( sprintf( "cannot create group %s " , $group->get_groupname ) , $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( "cannot create group %s " , $group->get_groupname ) );
print sprintf("robots::group_create: Cannot create group %s\n" , $group->get_groupname );
}
}
Modified: trunk/vhffs-robots/src/group_delete.pl
===================================================================
--- trunk/vhffs-robots/src/group_delete.pl 2012-02-23 00:06:09 UTC (rev 2040)
+++ trunk/vhffs-robots/src/group_delete.pl 2012-02-23 00:36:01 UTC (rev 2041)
@@ -48,7 +48,7 @@
foreach my $group ( @{$groups} )
{
if( $group->is_empty ) {
- Vhffs::Robots::vhffs_log( sprintf( 'Deleted group %s' , $group->get_groupname ), $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( 'Deleted group %s' , $group->get_groupname ));
Vhffs::Robots::Group::delete( $vhffs , $group );
}
else {
@@ -60,7 +60,7 @@
}
}
- Vhffs::Robots::vhffs_log( sprintf( 'Cannot delete group %s, items are remaining, delete status have been set to those items' , $group->get_groupname ), $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( 'Cannot delete group %s, items are remaining, delete status have been set to those items' , $group->get_groupname ));
}
}
Modified: trunk/vhffs-robots/src/group_quota.pl
===================================================================
--- trunk/vhffs-robots/src/group_quota.pl 2012-02-23 00:06:09 UTC (rev 2040)
+++ trunk/vhffs-robots/src/group_quota.pl 2012-02-23 00:36:01 UTC (rev 2041)
@@ -60,7 +60,7 @@
and $hardblocks == $setblocks and $hardinodes == $setinodes) {
unless( Quota::setqlim($dev, $group->get_gid, $setblocks, $setblocks, $setinodes, $setinodes, 0, 1) ) {
- Vhffs::Robots::vhffs_log( 'Set quota for group '.$group->get_groupname.' (gid '.$group->get_gid.') to '.$group->get_quota.' MB', $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, 'Set quota for group '.$group->get_groupname.' (gid '.$group->get_gid.') to '.$group->get_quota.' MB');
} else {
print 'Cannot set quota for group '.$group->get_groupname.' (gid '.$group->get_gid.'), reason: '.Quota::strerr()."\n";
}
@@ -72,7 +72,7 @@
next if $used == $group->get_quota_used;
$group->set_quota_used( $used );
$group->commit;
- Vhffs::Robots::vhffs_log( 'Updated quota used for group '.$group->get_groupname.' (gid '.$group->get_gid.') to '.$used.' MB', $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, 'Updated quota used for group '.$group->get_groupname.' (gid '.$group->get_gid.') to '.$used.' MB');
}
Vhffs::Robots::unlock( $vhffs , 'quotagroup' );
Modified: trunk/vhffs-robots/src/mail_create.pl
===================================================================
--- trunk/vhffs-robots/src/mail_create.pl 2012-02-23 00:06:09 UTC (rev 2040)
+++ trunk/vhffs-robots/src/mail_create.pl 2012-02-23 00:36:01 UTC (rev 2041)
@@ -57,11 +57,11 @@
$m->set_status( Vhffs::Constants::ACTIVATED );
if( $m->commit > 0 )
{
- Vhffs::Robots::vhffs_log( sprintf( "Create mail domain %s" , $m->get_domain ) , $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( "Create mail domain %s" , $m->get_domain ) );
}
else
{
- Vhffs::Robots::vhffs_log( sprintf( "cannot create mail domain %s" , $m->get_domain ) , $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( "cannot create mail domain %s" , $m->get_domain ) );
}
}
Modified: trunk/vhffs-robots/src/mail_delete.pl
===================================================================
--- trunk/vhffs-robots/src/mail_delete.pl 2012-02-23 00:06:09 UTC (rev 2040)
+++ trunk/vhffs-robots/src/mail_delete.pl 2012-02-23 00:36:01 UTC (rev 2041)
@@ -58,7 +58,7 @@
$list->set_status( Vhffs::Constants::TO_DELETE );
$list->commit;
}
- Vhffs::Robots::vhffs_log( sprintf( 'Cannot delete mail domain %s, remains lists, requests have been sent to delete them' , $mail->get_domain ) , $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( 'Cannot delete mail domain %s, remains lists, requests have been sent to delete them' , $mail->get_domain ) );
# Do not call next right now, check for boxes to avoir further failure
}
@@ -66,13 +66,13 @@
foreach my $bo ( values( %{$mail->get_boxes()} ) ) {
$mail->set_box_status( $bo->{'local_part'} , Vhffs::Constants::TO_DELETE );
}
- Vhffs::Robots::vhffs_log( sprintf( 'Cannot delete mail domain %s, remains %d boxes, requests have been sent to delete them' , $mail->get_domain , $mail->nb_boxes() ) , $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( 'Cannot delete mail domain %s, remains %d boxes, requests have been sent to delete them' , $mail->get_domain , $mail->nb_boxes() ) );
next;
}
next if(@$lists);
- Vhffs::Robots::vhffs_log( sprintf( "Delete mail domain %s" , $mail->get_domain ) , $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( "Delete mail domain %s" , $mail->get_domain ) );
my $dir = $mail->get_dir();
if( defined($dir) && -d $dir && -r _ && -w _ && -x _ ) {
@@ -85,10 +85,10 @@
rmdir $dir;
if(@$errors) {
- Vhffs::Robots::vhffs_log( sprintf( 'Something went wrong during %s mail domain deletion: %s', $mail->get_domain, join(', ', @$errors) ) );
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( 'Something went wrong during %s mail domain deletion: %s', $mail->get_domain, join(', ', @$errors) ) );
}
} else {
- Vhffs::Robots::vhffs_log( sprintf( 'Unable to get mail domain directory or bad permission for mail domain %s, aborting file system deletion', $mail->get_domain ) );
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( 'Unable to get mail domain directory or bad permission for mail domain %s, aborting file system deletion', $mail->get_domain ) );
}
$mail->delete;
}
Modified: trunk/vhffs-robots/src/mailinglist_create.pl
===================================================================
--- trunk/vhffs-robots/src/mailinglist_create.pl 2012-02-23 00:06:09 UTC (rev 2040)
+++ trunk/vhffs-robots/src/mailinglist_create.pl 2012-02-23 00:36:01 UTC (rev 2041)
@@ -54,11 +54,11 @@
$ml->set_status( Vhffs::Constants::ACTIVATED );
if( $ml->commit < 0 )
{
- Vhffs::Robots::vhffs_log( sprintf( "Cannot create list %s", $ml->get_label ), $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( "Cannot create list %s", $ml->get_label ));
}
else
{
- Vhffs::Robots::vhffs_log( sprintf( "Create list %s", $ml->get_label ), $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( "Create list %s", $ml->get_label ));
}
}
Modified: trunk/vhffs-robots/src/mailinglist_delete.pl
===================================================================
--- trunk/vhffs-robots/src/mailinglist_delete.pl 2012-02-23 00:06:09 UTC (rev 2040)
+++ trunk/vhffs-robots/src/mailinglist_delete.pl 2012-02-23 00:36:01 UTC (rev 2041)
@@ -48,11 +48,11 @@
{
if( $ml->delete < 0 )
{
- Vhffs::Robots::vhffs_log( sprintf( "Cannot delete list %s" , $ml->get_listname ) , $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( "Cannot delete list %s" , $ml->get_listname ) );
}
else
{
- Vhffs::Robots::vhffs_log( sprintf( "Delete list %s" , $ml->get_listname ) , $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( "Delete list %s" , $ml->get_listname ) );
}
}
Modified: trunk/vhffs-robots/src/mercurial_create.pl
===================================================================
--- trunk/vhffs-robots/src/mercurial_create.pl 2012-02-23 00:06:09 UTC (rev 2040)
+++ trunk/vhffs-robots/src/mercurial_create.pl 2012-02-23 00:36:01 UTC (rev 2041)
@@ -48,9 +48,9 @@
foreach my $mercurial ( @{$repos} )
{
if( Vhffs::Robots::Mercurial::create_repo( $mercurial ) != 0 ) {
- Vhffs::Robots::vhffs_log( sprintf( 'Cannot create Mercurial %s' , $mercurial->get_reponame ), $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( 'Cannot create Mercurial %s' , $mercurial->get_reponame ));
} else {
- Vhffs::Robots::vhffs_log( sprintf( 'Created Mercurial %s' , $mercurial->get_reponame ), $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( 'Created Mercurial %s' , $mercurial->get_reponame ));
}
}
Modified: trunk/vhffs-robots/src/mercurial_delete.pl
===================================================================
--- trunk/vhffs-robots/src/mercurial_delete.pl 2012-02-23 00:06:09 UTC (rev 2040)
+++ trunk/vhffs-robots/src/mercurial_delete.pl 2012-02-23 00:36:01 UTC (rev 2041)
@@ -48,15 +48,15 @@
foreach my $mercurial ( @{$repos} )
{
if( Vhffs::Robots::Mercurial::delete_repo( $mercurial ) != 0 ) {
- Vhffs::Robots::vhffs_log( sprintf( 'Cannot delete files from Mercurial repository %s' , $mercurial->get_reponame ), $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( 'Cannot delete files from Mercurial repository %s' , $mercurial->get_reponame ));
} else {
- Vhffs::Robots::vhffs_log( sprintf( 'Delete files from Mercurial repository %s' , $mercurial->get_reponame ), $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( 'Delete files from Mercurial repository %s' , $mercurial->get_reponame ));
}
if( $mercurial->delete < 0 ) {
- Vhffs::Robots::vhffs_log( sprintf( 'Cannot delete Mercurial repository object %s' , $mercurial->get_reponame ), $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( 'Cannot delete Mercurial repository object %s' , $mercurial->get_reponame ));
} else {
- Vhffs::Robots::vhffs_log( sprintf( 'Delete Mercurial repository object %s' , $mercurial->get_reponame ), $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( 'Delete Mercurial repository object %s' , $mercurial->get_reponame ));
}
}
Modified: trunk/vhffs-robots/src/mercurial_public.pl
===================================================================
--- trunk/vhffs-robots/src/mercurial_public.pl 2012-02-23 00:06:09 UTC (rev 2040)
+++ trunk/vhffs-robots/src/mercurial_public.pl 2012-02-23 00:36:01 UTC (rev 2041)
@@ -49,10 +49,10 @@
{
if( $mercurial->is_public == 1 ) {
chmod 02775 , $mercurial->get_dir;
- Vhffs::Robots::vhffs_log( sprintf( 'Mercurial status %s is now public' , $mercurial->get_dir ) , $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( 'Mercurial status %s is now public' , $mercurial->get_dir ) );
} else {
chmod 02770 , $mercurial->get_dir;
- Vhffs::Robots::vhffs_log( sprintf( 'Mercurial status %s is now private' , $mercurial->get_dir ) , $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( 'Mercurial status %s is now private' , $mercurial->get_dir ) );
}
Vhffs::Robots::Mercurial::change_conf( $mercurial );
Modified: trunk/vhffs-robots/src/mysql_create.pl
===================================================================
--- trunk/vhffs-robots/src/mysql_create.pl 2012-02-23 00:06:09 UTC (rev 2040)
+++ trunk/vhffs-robots/src/mysql_create.pl 2012-02-23 00:36:01 UTC (rev 2041)
@@ -53,12 +53,12 @@
{
if( Vhffs::Robots::Mysql::create_db( $vhffs , $db ) < 0 )
{
- Vhffs::Robots::vhffs_log( sprintf("Cannot create MySQL database %s",$db->get_dbname) , $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf("Cannot create MySQL database %s",$db->get_dbname) );
}
else
{
- Vhffs::Robots::vhffs_log( sprintf("Create MySQL database %s",$db->get_dbname) , $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf("Create MySQL database %s",$db->get_dbname) );
}
}
Modified: trunk/vhffs-robots/src/mysql_delete.pl
===================================================================
--- trunk/vhffs-robots/src/mysql_delete.pl 2012-02-23 00:06:09 UTC (rev 2040)
+++ trunk/vhffs-robots/src/mysql_delete.pl 2012-02-23 00:36:01 UTC (rev 2041)
@@ -51,11 +51,11 @@
{
if( Vhffs::Robots::Mysql::delete_db( $vhffs , $db ) < 0 )
{
- Vhffs::Robots::vhffs_log( sprintf( "Cannot delete MySQL database %s" , $db->get_dbname ), $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( "Cannot delete MySQL database %s" , $db->get_dbname ));
}
else
{
- Vhffs::Robots::vhffs_log( sprintf( "Delete MySQL database %s" , $db->get_dbname ), $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( "Delete MySQL database %s" , $db->get_dbname ));
}
}
Modified: trunk/vhffs-robots/src/mysql_modify.pl
===================================================================
--- trunk/vhffs-robots/src/mysql_modify.pl 2012-02-23 00:06:09 UTC (rev 2040)
+++ trunk/vhffs-robots/src/mysql_modify.pl 2012-02-23 00:36:01 UTC (rev 2041)
@@ -51,11 +51,11 @@
{
if( Vhffs::Robots::Mysql::update_db( $vhffs , $db ) < 0 )
{
- Vhffs::Robots::vhffs_log( "Error while update MySQL database" , $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, "Error while update MySQL database" );
}
else
{
- Vhffs::Robots::vhffs_log( sprintf( "Update MySQL database %s" , $db->get_dbname ) , $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( "Update MySQL database %s" , $db->get_dbname ) );
}
}
Modified: trunk/vhffs-robots/src/object_cleanup.pl
===================================================================
--- trunk/vhffs-robots/src/object_cleanup.pl 2012-02-23 00:06:09 UTC (rev 2040)
+++ trunk/vhffs-robots/src/object_cleanup.pl 2012-02-23 00:36:01 UTC (rev 2041)
@@ -49,7 +49,7 @@
foreach my $object ( @{$objects} )
{
$object = Vhffs::ObjectFactory::fetch_object( $vhffs , $object->get_oid );
- Vhffs::Robots::vhffs_log( sprintf( "deleted object %d because it waited too long in refused state" , $object->get_oid ) , $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( "deleted object %d because it waited too long in refused state" , $object->get_oid ) );
$object->delete_withmail;
}
Modified: trunk/vhffs-robots/src/pgsql_create.pl
===================================================================
--- trunk/vhffs-robots/src/pgsql_create.pl 2012-02-23 00:06:09 UTC (rev 2040)
+++ trunk/vhffs-robots/src/pgsql_create.pl 2012-02-23 00:36:01 UTC (rev 2041)
@@ -49,11 +49,11 @@
{
if( Vhffs::Robots::Pgsql::create_db( $vhffs , $db ) < 0 )
{
- Vhffs::Robots::vhffs_log( sprintf("Cannot create PostgreSQL database %s",$db->get_dbname) , $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf("Cannot create PostgreSQL database %s",$db->get_dbname) );
}
else
{
- Vhffs::Robots::vhffs_log( sprintf("Create PostgreSQL database %s",$db->get_dbname) , $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf("Create PostgreSQL database %s",$db->get_dbname) );
}
}
Modified: trunk/vhffs-robots/src/pgsql_delete.pl
===================================================================
--- trunk/vhffs-robots/src/pgsql_delete.pl 2012-02-23 00:06:09 UTC (rev 2040)
+++ trunk/vhffs-robots/src/pgsql_delete.pl 2012-02-23 00:36:01 UTC (rev 2041)
@@ -50,11 +50,11 @@
{
if( Vhffs::Robots::Pgsql::delete_db( $vhffs , $db ) < 0 )
{
- Vhffs::Robots::vhffs_log( sprintf( "Cannot delete PostgreSQL database %s" , $db->get_dbname ), $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( "Cannot delete PostgreSQL database %s" , $db->get_dbname ));
}
else
{
- Vhffs::Robots::vhffs_log( sprintf( "Delete PostgreSQL database %s" , $db->get_dbname ), $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( "Delete PostgreSQL database %s" , $db->get_dbname ));
}
}
Modified: trunk/vhffs-robots/src/repository_create.pl
===================================================================
--- trunk/vhffs-robots/src/repository_create.pl 2012-02-23 00:06:09 UTC (rev 2040)
+++ trunk/vhffs-robots/src/repository_create.pl 2012-02-23 00:36:01 UTC (rev 2041)
@@ -50,11 +50,11 @@
{
if( Vhffs::Robots::Repository::create_repository( $repo ) > 0 )
{
- Vhffs::Robots::vhffs_log( sprintf( "REPOSITORY: Download repository %s is created" , $repo->get_name ) , $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( "REPOSITORY: Download repository %s is created" , $repo->get_name ) );
}
else
{
- Vhffs::Robots::vhffs_log( sprintf( "REPOSITORY: Cannot create download repository %s" , $repo->get_name ) , $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( "REPOSITORY: Cannot create download repository %s" , $repo->get_name ) );
}
}
Modified: trunk/vhffs-robots/src/repository_delete.pl
===================================================================
--- trunk/vhffs-robots/src/repository_delete.pl 2012-02-23 00:06:09 UTC (rev 2040)
+++ trunk/vhffs-robots/src/repository_delete.pl 2012-02-23 00:36:01 UTC (rev 2041)
@@ -53,20 +53,20 @@
{
if( Vhffs::Robots::Repository::delete_repository( $repo ) > 0 )
{
- Vhffs::Robots::vhffs_log( sprintf( "Delete files from %s", $repo->get_name ), $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( "Delete files from %s", $repo->get_name ));
}
else
{
- Vhffs::Robots::vhffs_log( sprintf( "Cannot delete files from %s", $repo->get_name ), $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( "Cannot delete files from %s", $repo->get_name ));
}
if( $repo->delete > 0 )
{
- Vhffs::Robots::vhffs_log( sprintf( "Deleted download repository object %s", $repo->get_name ), $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( "Deleted download repository object %s", $repo->get_name ));
}
else
{
- Vhffs::Robots::vhffs_log( sprintf( "Cannot delete download repository object %s", $repo->get_name ), $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( "Cannot delete download repository object %s", $repo->get_name ));
}
}
}
Modified: trunk/vhffs-robots/src/repository_quota.pl
===================================================================
--- trunk/vhffs-robots/src/repository_quota.pl 2012-02-23 00:06:09 UTC (rev 2040)
+++ trunk/vhffs-robots/src/repository_quota.pl 2012-02-23 00:36:01 UTC (rev 2041)
@@ -63,7 +63,7 @@
and $hardblocks == $setblocks and $hardinodes == $setinodes) {
unless( Quota::setqlim($dev, $repo->get_owner_gid, $setblocks, $setblocks, $setinodes, $setinodes, 0, 1) ) {
- Vhffs::Robots::vhffs_log( 'Set quota for repository '.$repo->get_name.' (gid '.$repo->get_owner_gid.') to '.$repo->get_quota.' MB', $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, 'Set quota for repository '.$repo->get_name.' (gid '.$repo->get_owner_gid.') to '.$repo->get_quota.' MB');
} else {
print 'Cannot set quota for repository '.$repo->get_name.' (gid '.$repo->get_owner_gid.'), reason: '.Quota::strerr()."\n";
}
@@ -75,7 +75,7 @@
next if $used == $repo->get_quota_used;
$repo->set_quota_used( $used );
$repo->commit;
- Vhffs::Robots::vhffs_log( 'Updated quota used for repository '.$repo->get_name.' (gid '.$repo->get_owner_gid.') to '.$used.' MB', $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, 'Updated quota used for repository '.$repo->get_name.' (gid '.$repo->get_owner_gid.') to '.$used.' MB');
}
# Give no space for groups without download repository
Modified: trunk/vhffs-robots/src/svn_create.pl
===================================================================
--- trunk/vhffs-robots/src/svn_create.pl 2012-02-23 00:06:09 UTC (rev 2040)
+++ trunk/vhffs-robots/src/svn_create.pl 2012-02-23 00:36:01 UTC (rev 2041)
@@ -48,9 +48,9 @@
foreach my $svn ( @{$repos} )
{
if( Vhffs::Robots::Svn::create_repo( $svn ) != 0 ) {
- Vhffs::Robots::vhffs_log( sprintf( 'Cannot create SVN %s' , $svn->get_reponame ), $vhffs );
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( 'Cannot create SVN %s' , $svn->get_reponame ), $vhffs );
} else {
- Vhffs::Robots::vhffs_log( sprintf( 'Created SVN %s' , $svn->get_reponame ), $vhffs );
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( 'Created SVN %s' , $svn->get_reponame ), $vhffs );
}
}
Modified: trunk/vhffs-robots/src/svn_delete.pl
===================================================================
--- trunk/vhffs-robots/src/svn_delete.pl 2012-02-23 00:06:09 UTC (rev 2040)
+++ trunk/vhffs-robots/src/svn_delete.pl 2012-02-23 00:36:01 UTC (rev 2041)
@@ -48,15 +48,15 @@
foreach my $svn ( @{$repos} )
{
if( Vhffs::Robots::Svn::delete_repo( $svn ) != 0 ) {
- Vhffs::Robots::vhffs_log( sprintf( 'Cannot delete files from SVN repository %s' , $svn->get_reponame ), $vhffs );
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( 'Cannot delete files from SVN repository %s' , $svn->get_reponame ), $vhffs );
} else {
- Vhffs::Robots::vhffs_log( sprintf( 'Delete files from SVN repository %s' , $svn->get_reponame ), $vhffs );
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( 'Delete files from SVN repository %s' , $svn->get_reponame ), $vhffs );
}
if( $svn->delete < 0 ) {
- Vhffs::Robots::vhffs_log( sprintf( 'Cannot delete SVN repository object %s' , $svn->get_reponame ), $vhffs );
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( 'Cannot delete SVN repository object %s' , $svn->get_reponame ), $vhffs );
} else {
- Vhffs::Robots::vhffs_log( sprintf( 'Delete SVN repository object %s' , $svn->get_reponame ), $vhffs );
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( 'Delete SVN repository object %s' , $svn->get_reponame ), $vhffs );
}
}
Modified: trunk/vhffs-robots/src/svn_public.pl
===================================================================
--- trunk/vhffs-robots/src/svn_public.pl 2012-02-23 00:06:09 UTC (rev 2040)
+++ trunk/vhffs-robots/src/svn_public.pl 2012-02-23 00:36:01 UTC (rev 2041)
@@ -49,10 +49,10 @@
{
if( $svn->is_public == 1 ) {
chmod 02775 , $svn->get_dir;
- Vhffs::Robots::vhffs_log( sprintf( 'SVN status %s is now public' , $svn->get_dir ) , $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( 'SVN status %s is now public' , $svn->get_dir ) );
} else {
chmod 02770 , $svn->get_dir;
- Vhffs::Robots::vhffs_log( sprintf( 'SVN status %s is now private' , $svn->get_dir ) , $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( 'SVN status %s is now private' , $svn->get_dir ) );
}
Vhffs::Robots::Svn::change_conf( $svn );
Modified: trunk/vhffs-robots/src/user_cleanup.pl
===================================================================
--- trunk/vhffs-robots/src/user_cleanup.pl 2012-02-23 00:06:09 UTC (rev 2040)
+++ trunk/vhffs-robots/src/user_cleanup.pl 2012-02-23 00:36:01 UTC (rev 2041)
@@ -47,7 +47,7 @@
my $users = Vhffs::User::get_unused_accounts( $vhffs , 2592000 ); # 30 days
foreach my $user ( @{$users} )
{
- Vhffs::Robots::vhffs_log( sprintf( 'deleted user %s because it was unused' , $user->get_username ) , $vhffs );
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( 'deleted user %s because it was unused' , $user->get_username ) , $vhffs );
$user->pendingdeletion_withmail;
}
Modified: trunk/vhffs-robots/src/user_create.pl
===================================================================
--- trunk/vhffs-robots/src/user_create.pl 2012-02-23 00:06:09 UTC (rev 2040)
+++ trunk/vhffs-robots/src/user_create.pl 2012-02-23 00:36:01 UTC (rev 2041)
@@ -51,11 +51,11 @@
{
if( Vhffs::Robots::User::create_home( $vhffs , $user ) != 0 )
{
- Vhffs::Robots::vhffs_log( sprintf( "Error while creating home for %s" , $user->get_username) , $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( "Error while creating home for %s" , $user->get_username) );
}
else
{
- Vhffs::Robots::vhffs_log( sprintf( "Creating home/account for %s" , $user->get_username) , $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( "Creating home/account for %s" , $user->get_username) );
}
}
Modified: trunk/vhffs-robots/src/user_delete.pl
===================================================================
--- trunk/vhffs-robots/src/user_delete.pl 2012-02-23 00:06:09 UTC (rev 2040)
+++ trunk/vhffs-robots/src/user_delete.pl 2012-02-23 00:36:01 UTC (rev 2041)
@@ -59,7 +59,7 @@
{
foreach $group ( @{$groups} )
{
- Vhffs::Robots::vhffs_log( sprintf("Delete %s, remains group(s) : will delete %s " , $user->get_username , $group->get_groupname ) , $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf("Delete %s, remains group(s) : will delete %s " , $user->get_username , $group->get_groupname ) );
if( $group->get_owner_uid == $user->get_uid )
{
$ok = 0;
@@ -71,28 +71,28 @@
if( $ok == 1 )
{
- Vhffs::Robots::vhffs_log( sprintf( "USER delete user %s" , $user->get_username ) , $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( "USER delete user %s" , $user->get_username ) );
if( Vhffs::Robots::User::delete( $vhffs, $user ) < 0 )
{
- Vhffs::Robots::vhffs_log( sprintf("Cannot delete user files %s" , $user->get_username ) , $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf("Cannot delete user files %s" , $user->get_username ) );
}
else
{
- Vhffs::Robots::vhffs_log( sprintf("Delete user files %s" , $user->get_username ) , $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf("Delete user files %s" , $user->get_username ) );
}
if( $user->delete < 0 )
{
- Vhffs::Robots::vhffs_log( sprintf("Cannot delete user object %s" , $user->get_username ) , $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf("Cannot delete user object %s" , $user->get_username ) );
}
else
{
- Vhffs::Robots::vhffs_log( sprintf("Delete user object %s" , $user->get_username ) , $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf("Delete user object %s" , $user->get_username ) );
}
}
else
{
- Vhffs::Robots::vhffs_log( sprintf("Cannot remove user %s, remains group(s)" , $user->get_username ) , $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf("Cannot remove user %s, remains group(s)" , $user->get_username ) );
}
}
}
Modified: trunk/vhffs-robots/src/user_group.pl
===================================================================
--- trunk/vhffs-robots/src/user_group.pl 2012-02-23 00:06:09 UTC (rev 2040)
+++ trunk/vhffs-robots/src/user_group.pl 2012-02-23 00:36:01 UTC (rev 2041)
@@ -51,7 +51,7 @@
my $joins = Vhffs::Robots::Group::getall_user_group_to_create( $vhffs );
if(!ref($joins)) {
- Vhffs::Robots::vhffs_log( 'Database error while trying to add new users to groups' );
+ Vhffs::Robots::vhffs_log( $vhffs, 'Database error while trying to add new users to groups' );
} else {
foreach(@{$joins}) {
$group = Vhffs::Group::get_by_gid( $vhffs , $_->[0] );
@@ -60,15 +60,15 @@
if( defined $user ) {
if( Vhffs::Robots::Group::add_user( $user , $group , $vhffs ) < 0 ) {
- Vhffs::Robots::vhffs_log( sprintf( "Error while adding user %s to group %s" , $user->get_username , $group->get_groupname ), $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( "Error while adding user %s to group %s" , $user->get_username , $group->get_groupname ));
} else {
- Vhffs::Robots::vhffs_log( sprintf( "Added user %s to group %s" , $user->get_username , $group->get_groupname ), $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( "Added user %s to group %s" , $user->get_username , $group->get_groupname ));
}
} else {
- Vhffs::Robots::vhffs_log( sprintf( "Cannot get user %s" , $_->[1] ), $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( "Cannot get user %s" , $_->[1] ));
}
} else {
- Vhffs::Robots::vhffs_log( sprintf( "Cannot get group %s" , $_->[0] ), $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( "Cannot get group %s" , $_->[0] ));
}
}
}
@@ -78,7 +78,7 @@
my $quits = Vhffs::Robots::Group::getall_user_group_to_delete( $vhffs );
if(!ref($quits)) {
- Vhffs::Robots::vhffs_log( 'Database error while trying to delete users from groups' );
+ Vhffs::Robots::vhffs_log( $vhffs, 'Database error while trying to delete users from groups' );
} else {
foreach(@{$quits}) {
$group = Vhffs::Group::get_by_gid( $vhffs , $_->[0] );
@@ -86,15 +86,15 @@
$user = Vhffs::User::get_by_uid( $vhffs , $_->[1] );
if( defined $user ) {
if( Vhffs::Robots::Group::del_user( $user , $group , $vhffs ) > 0 ) {
- Vhffs::Robots::vhffs_log( sprintf( 'Removed user %s from group %s', $user->get_username, $group->get_groupname ), $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( 'Removed user %s from group %s', $user->get_username, $group->get_groupname ));
} else {
- Vhffs::Robots::vhffs_log( sprintf( 'Error while removing user %s from group %s', $user->get_username, $group->get_groupname ), $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( 'Error while removing user %s from group %s', $user->get_username, $group->get_groupname ));
}
} else {
- Vhffs::Robots::vhffs_log( sprintf( 'Cannot get user %d', $_->[1] ), $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( 'Cannot get user %d', $_->[1] ));
}
} else {
- Vhffs::Robots::vhffs_log( sprintf( 'Cannot get group %d' , $->[0] ), $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( 'Cannot get group %d' , $->[0] ));
}
}
}
Modified: trunk/vhffs-robots/src/user_quota.pl
===================================================================
--- trunk/vhffs-robots/src/user_quota.pl 2012-02-23 00:06:09 UTC (rev 2040)
+++ trunk/vhffs-robots/src/user_quota.pl 2012-02-23 00:36:01 UTC (rev 2041)
@@ -61,7 +61,7 @@
and $hardblocks == $setblocks and $hardinodes == $setinodes) {
unless( Quota::setqlim($dev, $group->get_gid, $setblocks, $setblocks, $setinodes, $setinodes, 0, 1) ) {
- Vhffs::Robots::vhffs_log( 'Set quota for user '.$user->get_username.' (gid '.$group->get_gid.') to '.$group->get_quota.' MB', $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, 'Set quota for user '.$user->get_username.' (gid '.$group->get_gid.') to '.$group->get_quota.' MB');
} else {
print 'Cannot set quota for user '.$user->get_username.' (gid '.$group->get_gid.'), reason: '.Quota::strerr()."\n";
}
@@ -73,7 +73,7 @@
next if $used == $group->get_quota_used;
$group->set_quota_used( $used );
$group->commit;
- Vhffs::Robots::vhffs_log( 'Updated quota used for user '.$user->get_username.' (gid '.$group->get_gid.') to '.$used.' MB', $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, 'Updated quota used for user '.$user->get_username.' (gid '.$group->get_gid.') to '.$used.' MB');
}
Vhffs::Robots::unlock( $vhffs, 'quotauser' );
Modified: trunk/vhffs-robots/src/web_create.pl
===================================================================
--- trunk/vhffs-robots/src/web_create.pl 2012-02-23 00:06:09 UTC (rev 2040)
+++ trunk/vhffs-robots/src/web_create.pl 2012-02-23 00:36:01 UTC (rev 2041)
@@ -50,11 +50,11 @@
{
if( Vhffs::Robots::Web::create_web( $vhffs , $web ) < 0 )
{
- Vhffs::Robots::vhffs_log( sprintf( "Cannot create web %s" , $web->get_servername ) , $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( "Cannot create web %s" , $web->get_servername ) );
}
else
{
- Vhffs::Robots::vhffs_log( sprintf( "Create web %s" , $web->get_servername ) , $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( "Create web %s" , $web->get_servername ) );
}
}
Modified: trunk/vhffs-robots/src/web_delete.pl
===================================================================
--- trunk/vhffs-robots/src/web_delete.pl 2012-02-23 00:06:09 UTC (rev 2040)
+++ trunk/vhffs-robots/src/web_delete.pl 2012-02-23 00:36:01 UTC (rev 2041)
@@ -52,11 +52,11 @@
{
if( Vhffs::Robots::Web::delete( $vhffs , $web ) < 0 )
{
- Vhffs::Robots::vhffs_log( sprintf( "Cannot delete web %s" , $web->get_servername ) , $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( "Cannot delete web %s" , $web->get_servername ) );
}
else
{
- Vhffs::Robots::vhffs_log( sprintf( "Delete web %s" , $web->get_servername ) , $vhffs);
+ Vhffs::Robots::vhffs_log( $vhffs, sprintf( "Delete web %s" , $web->get_servername ) );
}
}