[vhffs-dev] [svn] commit: r113 - /trunk/vhffs-robots/src/

[ Thread Index | Date Index | More vhffs.org/vhffs-dev Archives ]


Author: soda
Date: Thu Dec 15 20:45:38 2005
New Revision: 113

Log:
correct use of vhffs_log
fix intl
et dans ton cul aussi



Modified:
    trunk/vhffs-robots/src/create_cvs.pl
    trunk/vhffs-robots/src/create_dns.pl
    trunk/vhffs-robots/src/create_groups.pl
    trunk/vhffs-robots/src/create_mail.pl
    trunk/vhffs-robots/src/create_ml.pl
    trunk/vhffs-robots/src/create_mysql.pl
    trunk/vhffs-robots/src/create_pgsql.pl
    trunk/vhffs-robots/src/create_svn.pl
    trunk/vhffs-robots/src/create_web.pl
    trunk/vhffs-robots/src/cvs_fixperms.pl
    trunk/vhffs-robots/src/cvsanonymous.pl
    trunk/vhffs-robots/src/delete_cvs.pl
    trunk/vhffs-robots/src/delete_dns.pl
    trunk/vhffs-robots/src/delete_group.pl
    trunk/vhffs-robots/src/delete_mail.pl
    trunk/vhffs-robots/src/delete_ml.pl
    trunk/vhffs-robots/src/delete_mysql.pl
    trunk/vhffs-robots/src/delete_pgsql.pl
    trunk/vhffs-robots/src/delete_svn.pl
    trunk/vhffs-robots/src/delete_users.pl
    trunk/vhffs-robots/src/delete_web.pl
    trunk/vhffs-robots/src/fix_quota.pl
    trunk/vhffs-robots/src/mailing.pl
    trunk/vhffs-robots/src/modify_mysql.pl
    trunk/vhffs-robots/src/parse_httplog.pl
    trunk/vhffs-robots/src/user_group.pl

Modified: trunk/vhffs-robots/src/create_cvs.pl
==============================================================================
--- trunk/vhffs-robots/src/create_cvs.pl (original)
+++ trunk/vhffs-robots/src/create_cvs.pl Thu Dec 15 20:45:38 2005
@@ -16,11 +16,11 @@
 {
 		if( Vhffs::Robots::Cvs::create_cvs( $cvs ) > 0 )
 		{
-			vhffs_log( sprintf( "CVS %s is created" , $c->get_cvsroot ) );
+			Vhffs::Robots::vhffs_log( sprintf( "CVS %s is created" , $c->get_cvsroot ) );
 		}
 		else
 		{
-			vhffs_log( sprintf( "cannot create %s CVS repository" , $c->get_cvsroot ) );
+			Vhffs::Robots::vhffs_log( sprintf( "cannot create %s CVS repository" , $c->get_cvsroot ) );
 		}
 }
 

Modified: trunk/vhffs-robots/src/create_dns.pl
==============================================================================
--- trunk/vhffs-robots/src/create_dns.pl (original)
+++ trunk/vhffs-robots/src/create_dns.pl Thu Dec 15 20:45:38 2005
@@ -21,11 +21,11 @@
         $dns->activate;
         if( $dns->commit > 0 )
 		{
-			vhffs_log( sprintf( "Create domain %s" , $dns->get_domain  ) );
+			Vhffs::Robots::vhffs_log( sprintf( "Create domain %s" , $dns->get_domain  ) );
 		}
 		else
 		{
-			vhffs_log( sprintf( "Cannot create domain %s" , $dns->get_domain  ) );
+			Vhffs::Robots::vhffs_log( sprintf( "Cannot create domain %s" , $dns->get_domain  ) );
 		}
 
 	}

Modified: trunk/vhffs-robots/src/create_groups.pl
==============================================================================
--- trunk/vhffs-robots/src/create_groups.pl (original)
+++ trunk/vhffs-robots/src/create_groups.pl Thu Dec 15 20:45:38 2005
@@ -16,11 +16,11 @@
 {
 	if( Vhffs::Robots::Group::create_groupdir( $main , $group ) < 0 )
 	{
-		vhffs_log( sprintf( "cannot create group %s " , $group->get_groupname ) );
+		Vhffs::Robots::vhffs_log( sprintf( "cannot create group %s " , $group->get_groupname ) );
 	}
 	else
 	{
-		vhffs_log( sprintf( "create group %s " , $group->get_groupname ) );
+		Vhffs::Robots::vhffs_log( sprintf( "create group %s " , $group->get_groupname ) );
 	}
 }
 

Modified: trunk/vhffs-robots/src/create_mail.pl
==============================================================================
--- trunk/vhffs-robots/src/create_mail.pl (original)
+++ trunk/vhffs-robots/src/create_mail.pl Thu Dec 15 20:45:38 2005
@@ -20,11 +20,11 @@
 	$mail->set_status( Vhffs::Constants::ACTIVATED );
 	if( $mail->commit > 0 )
 	{
-		vhffs_log( sprintf( "Create mail domain %s" , $m->get_domain ) );
+		Vhffs::Robots::vhffs_log( sprintf( "Create mail domain %s" , $m->get_domain ) );
 	}
 	else
 	{
-		vhffs_log( sprintf( "cannot create mail domain %s" , $m->get_domain ) );
+		Vhffs::Robots::vhffs_log( sprintf( "cannot create mail domain %s" , $m->get_domain ) );
 	}
 }
 

Modified: trunk/vhffs-robots/src/create_ml.pl
==============================================================================
--- trunk/vhffs-robots/src/create_ml.pl (original)
+++ trunk/vhffs-robots/src/create_ml.pl Thu Dec 15 20:45:38 2005
@@ -17,11 +17,11 @@
 	$ml->set_status( Vhffs::Constants::ACTIVATED );
 	if( $ml->commit < 0 )
 	{
-		vhffs_log( sprintf( "Cannot create list %s", $ml->get_title ));
+		Vhffs::Robots::vhffs_log( sprintf( "Cannot create list %s", $ml->get_title ));
 	}
 	else
 	{
-		vhffs_log( sprintf( "Create list %s", $ml->get_title ));
+		Vhffs::Robots::vhffs_log( sprintf( "Create list %s", $ml->get_title ));
 	}
 }
 

Modified: trunk/vhffs-robots/src/create_mysql.pl
==============================================================================
--- trunk/vhffs-robots/src/create_mysql.pl (original)
+++ trunk/vhffs-robots/src/create_mysql.pl Thu Dec 15 20:45:38 2005
@@ -20,12 +20,12 @@
 {
 	if( Vhffs::Robots::Mysql::create_db( $main , $db ) < 0 )
 	{
-		vhffs_log( sprintf("Cannot create MySQL database %s",$db->get_dbname) );
+		Vhffs::Robots::vhffs_log( sprintf("Cannot create MySQL database %s",$db->get_dbname) );
 
 	}
 	else
 	{
-		vhffs_log( sprintf("Create MySQL database %s",$db->get_dbname) );
+		Vhffs::Robots::vhffs_log( sprintf("Create MySQL database %s",$db->get_dbname) );
 	}
 }
 

Modified: trunk/vhffs-robots/src/create_pgsql.pl
==============================================================================
--- trunk/vhffs-robots/src/create_pgsql.pl (original)
+++ trunk/vhffs-robots/src/create_pgsql.pl Thu Dec 15 20:45:38 2005
@@ -15,11 +15,11 @@
 {
 	if( Vhffs::Robots::Postgres::create_db( $main , $db ) < 0 )
 	{
-		vhffs_log( sprintf("Cannot create PostgreSQL database %s",$db->get_dbname) );
+		Vhffs::Robots::vhffs_log( sprintf("Cannot create PostgreSQL database %s",$db->get_dbname) );
 	}
 	else
 	{
-		vhffs_log( sprintf("Create PostgreSQL database %s",$db->get_dbname) );
+		Vhffs::Robots::vhffs_log( sprintf("Create PostgreSQL database %s",$db->get_dbname) );
 	}
 }
 

Modified: trunk/vhffs-robots/src/create_svn.pl
==============================================================================
--- trunk/vhffs-robots/src/create_svn.pl (original)
+++ trunk/vhffs-robots/src/create_svn.pl Thu Dec 15 20:45:38 2005
@@ -18,11 +18,11 @@
 		
 		if( Vhffs::Robots::Svn::create_repo( $vhffs , $svn ) < 0 )
 		{
-			vhffs_log( sprintf( "Cannot create SVN %s" , $svn->get_reponame ));
+			Vhffs::Robots::vhffs_log( sprintf( "Cannot create SVN %s" , $svn->get_reponame ));
 		}
 		else
 		{
-			vhffs_log( sprintf( "Create SVN %s" , $svn->get_reponame ));
+			Vhffs::Robots::vhffs_log( sprintf( "Create SVN %s" , $svn->get_reponame ));
 		}
 	}
 }

Modified: trunk/vhffs-robots/src/create_web.pl
==============================================================================
--- trunk/vhffs-robots/src/create_web.pl (original)
+++ trunk/vhffs-robots/src/create_web.pl Thu Dec 15 20:45:38 2005
@@ -16,11 +16,11 @@
 {
 	if( Vhffs::Robots::Web::create_web( $main , $web ) < 0 )
 	{
-		vhffs_log( sprintf( "Cannot create web %s" , $web->get_servername ) );
+		Vhffs::Robots::vhffs_log( sprintf( "Cannot create web %s" , $web->get_servername ) );
 	}
 	else
 	{
-		vhffs_log( sprintf( "Create web %s" , $web->get_servername ) );
+		Vhffs::Robots::vhffs_log( sprintf( "Create web %s" , $web->get_servername ) );
 	}
 }
 

Modified: trunk/vhffs-robots/src/cvs_fixperms.pl
==============================================================================
--- trunk/vhffs-robots/src/cvs_fixperms.pl (original)
+++ trunk/vhffs-robots/src/cvs_fixperms.pl Thu Dec 15 20:45:38 2005
@@ -10,7 +10,7 @@
 
 
 use Vhffs::Main;
-use Vhffs::Robots;
+use Vhffs::Robots qw( Vhffs::Robots::vhffs_log lock unlock );
 use Vhffs::Functions;
 use Vhffs::Constants;
 use Vhffs::Services::Cvs;
@@ -21,24 +21,59 @@
 my $cvss = Vhffs::Services::Cvs::getall( $main , Vhffs::Constants::WAITING_FOR_MODIFICATION );
 my $cvs;
 my $dir;
+my $user;
+my $group;
+my $readers_file;
+my $passwd_file;
 
 
 foreach $cvs ( @{$cvss} )
 {
-	if( $cvs->is_public == 0 )
+	if( $cvs->fetch > 0 )
 	{
-		vhffs_log( sprintf( "CVS fixperm (private) for %s", $cvs->get_cvsroot ));
-		$cvs->add_history("CVS is now private");
-		Vhffs::Functions::chmod_recur( $cvs->get_dir , 0660 , 02770 );
+		$dir = $cvs->get_dir . "/CVSROOT/" ;
+		$readers_file = $dir."/readers";
+		$passwd_file = $dir."/passwd";
+		$user = $cvs->get_user;
+		$group = $cvs->get_group;
+		#First, update uid and gid informations on files
+		if( ( $user->fetch > 0 ) && ( $group->fetch > 0 ) )
+	        {
+		            Vhffs::Functions::change_owner_recur( $cvs->get_dir , $user->get_uid , $group->get_gid );
+		}
+
+		if( $cvs->is_public == 0 )
+		{
+			Vhffs::Robots::vhffs_log( sprintf( "CVS fixperm (private) for %s", $cvs->get_cvsroot ));
+			$cvs->add_history("CVS is now private");
+			Vhffs::Functions::chmod_recur( $cvs->get_dir , 0660 , 02770 );
+
+			#Delete reader_file if exists
+			unlink( $readers_file ) if( -f $readers_file );
+		}
+		else
+		{
+			#Fix permissions
+			Vhffs::Robots::vhffs_log( sprintf( "CVS fixperm (public) for %s", $cvs->get_cvsroot ));
+			$cvs->add_history("CVS is now public");
+			Vhffs::Functions::chmod_recur( $cvs->get_dir , 0664 , 02775 );
+
+
+			#Fix readers file
+			Vhffs::Robots::vhffs_log( sprintf("CVS, put repository %s public" , $cvs->get_cvsroot));
+			open( FILE , ">$readers_file" ) or die( "cannot open $readers_file" );
+			print FILE "anonymous";
+			close( FILE );
+
+			open( FILE , ">$passwd_file" ) or die( "cannot open $passwd_file" );
+			print FILE "anonymous::".$username;
+			close( FILE );
+			chown $cvs->get_owneruid , $cvs->get_ownergid , $passwd_file;
+			chown $cvs->get_owneruid , $cvs->get_ownergid , $readers_file;
+		}
+		$cvs->set_status( Vhffs::Constants::ACTIVATED );
+		$cvs->commit;
 	}
-	else
-	{
-		vhffs_log( sprintf( "CVS fixperm (public) for %s", $cvs->get_cvsroot ));
-		$cvs->add_history("CVS is now public");
-		Vhffs::Functions::chmod_recur( $cvs->get_dir , 0664 , 02775 );
-	}
-	$cvs->set_status( Vhffs::Constants::ACTIVATED );
-	$cvs->commit;
 }
 
 Vhffs::Robots::unlock;

Modified: trunk/vhffs-robots/src/cvsanonymous.pl
==============================================================================
--- trunk/vhffs-robots/src/cvsanonymous.pl (original)
+++ trunk/vhffs-robots/src/cvsanonymous.pl Thu Dec 15 20:45:38 2005
@@ -41,7 +41,7 @@
     # Change files if cvs is public
     if( $cvs->is_public == 1 )
     {
-		vhffs_log( sprintf("CVS, put repository %s public" , $cvs->get_cvsroot));
+		Vhffs::Robots::vhffs_log( sprintf("CVS, put repository %s public" , $cvs->get_cvsroot));
 	open( FILE , ">$readers_file" ) or die( "cannot open $readers_file" );
 	print FILE "anonymous";
 	close( FILE );
@@ -56,7 +56,7 @@
     }
 	else
 	{
-		vhffs_log( sprintf("CVS, put repository %s private" , $cvs->get_cvsroot));
+		Vhffs::Robots::vhffs_log( sprintf("CVS, put repository %s private" , $cvs->get_cvsroot));
 		if( -f $readers_file )
 		{
 			unlink( $readers_file );

Modified: trunk/vhffs-robots/src/delete_cvs.pl
==============================================================================
--- trunk/vhffs-robots/src/delete_cvs.pl (original)
+++ trunk/vhffs-robots/src/delete_cvs.pl Thu Dec 15 20:45:38 2005
@@ -19,20 +19,20 @@
     {
         if( Vhffs::Robots::Cvs::delete_cvs( $cvs ) > 0 )
 		{
-			vhffs_log( sprintf( "Delete files from %s", $cvs->get_cvsroot ));
+			Vhffs::Robots::vhffs_log( sprintf( "Delete files from %s", $cvs->get_cvsroot ));
 		}
 		else
 		{
-			vhffs_log( sprintf( "Cannot delete files from %s", $cvs->get_cvsroot ));
+			Vhffs::Robots::vhffs_log( sprintf( "Cannot delete files from %s", $cvs->get_cvsroot ));
 		}
 		
 		if( $cvs->delete > 0 )
 		{
-			vhffs_log( sprintf( "Delete CVS object %s", $cvs->get_cvsroot ));
+			Vhffs::Robots::vhffs_log( sprintf( "Delete CVS object %s", $cvs->get_cvsroot ));
 		}
 		else
 		{
-			vhffs_log( sprintf( "Cannot delete CVS object %s", $cvs->get_cvsroot ));
+			Vhffs::Robots::vhffs_log( sprintf( "Cannot delete CVS object %s", $cvs->get_cvsroot ));
 		}
     }
 }

Modified: trunk/vhffs-robots/src/delete_dns.pl
==============================================================================
--- trunk/vhffs-robots/src/delete_dns.pl (original)
+++ trunk/vhffs-robots/src/delete_dns.pl Thu Dec 15 20:45:38 2005
@@ -18,11 +18,11 @@
 	{
 		if( $dns->delete > 0 )
 		{
-			vhffs_log( sprintf( "Delete %s", $dns->get_domain ));
+			Vhffs::Robots::vhffs_log( sprintf( "Delete %s", $dns->get_domain ));
 		}
 		else
 		{
-			vhffs_log( sprintf( "Cannot delete domain name %s", $dns->get_domain ));
+			Vhffs::Robots::vhffs_log( sprintf( "Cannot delete domain name %s", $dns->get_domain ));
 		}
 	}
 }

Modified: trunk/vhffs-robots/src/delete_group.pl
==============================================================================
--- trunk/vhffs-robots/src/delete_group.pl (original)
+++ trunk/vhffs-robots/src/delete_group.pl Thu Dec 15 20:45:38 2005
@@ -26,14 +26,14 @@
 
 foreach $group ( @{$groups} )
 {
-	vhffs_log( sprintf(  "Will try to delete group %s",  $group->get_groupname));
+	Vhffs::Robots::vhffs_log( sprintf(  "Will try to delete group %s",  $group->get_groupname));
 	$ok = 1;
 
     $objects = Vhffs::Services::Cvs::getall( $vhffs , undef , undef , $group );
 	$ok = 0 if( defined $objects );
     foreach $object ( @{$objects} )
     {
-		vhffs_log( sprintf( "Remain cvs for group %s before delete" , $group->get_groupname ));
+		Vhffs::Robots::vhffs_log( sprintf( "Remain cvs for group %s before delete" , $group->get_groupname ));
         $object->set_status( Vhffs::Constants::TO_DELETE );
 		$object->commit;
     }
@@ -42,7 +42,7 @@
 	$ok = 0 if( defined $objects );
     foreach $object ( @{$objects} )
     {
-		vhffs_log( sprintf( "Remain svn for group %s before delete" , $group->get_groupname ));
+		Vhffs::Robots::vhffs_log( sprintf( "Remain svn for group %s before delete" , $group->get_groupname ));
         $object->set_status( Vhffs::Constants::TO_DELETE );
 		$object->commit;
     }
@@ -51,7 +51,7 @@
 	$ok = 0 if( defined $objects );
     foreach $object ( @{$objects} )
     {
-		vhffs_log( sprintf( "Remain dns for group %s before delete" , $group->get_groupname ));
+		Vhffs::Robots::vhffs_log( sprintf( "Remain dns for group %s before delete" , $group->get_groupname ));
         $object->set_status( Vhffs::Constants::TO_DELETE );
 		$object->commit;
     }
@@ -60,7 +60,7 @@
 	$ok = 0 if( defined $objects );
     foreach $object ( @{$objects} )
     {
-		vhffs_log( sprintf( "Remain mysql for group %s before delete" , $group->get_groupname ));
+		Vhffs::Robots::vhffs_log( sprintf( "Remain mysql for group %s before delete" , $group->get_groupname ));
         $object->set_status( Vhffs::Constants::TO_DELETE );
 		$object->commit;
     }
@@ -69,7 +69,7 @@
 	$ok = 0 if( defined $objects );
    foreach $object ( @{$objects} )
    {
-		vhffs_log( sprintf( "Remain pgsql for group %s before delete" , $group->get_groupname ));
+		Vhffs::Robots::vhffs_log( sprintf( "Remain pgsql for group %s before delete" , $group->get_groupname ));
         $object->set_status( Vhffs::Constants::TO_DELETE );
 		$object->commit;
    }
@@ -79,7 +79,7 @@
 	$ok = 0 if( defined $objects );
    foreach $object ( @{$objects} )
    {
-		vhffs_log( sprintf( "Remain website for group %s before delete" , $group->get_groupname ));
+		Vhffs::Robots::vhffs_log( sprintf( "Remain website for group %s before delete" , $group->get_groupname ));
         $object->set_status( Vhffs::Constants::TO_DELETE );
 		$object->commit;
    }
@@ -88,7 +88,7 @@
 	$ok = 0 if( defined $objects );
    foreach $object ( @{$objects} )
    {
-		vhffs_log( sprintf( "Remain list for group %s before delete" , $group->get_groupname ));
+		Vhffs::Robots::vhffs_log( sprintf( "Remain list for group %s before delete" , $group->get_groupname ));
         $object->set_status( Vhffs::Constants::TO_DELETE );
 		$object->commit;
    }
@@ -98,23 +98,23 @@
 	$ok = 0 if( defined $objects );
    foreach $object ( @{$objects} )
    {
-		vhffs_log( sprintf( "Remain mail for group %s before delete" , $group->get_groupname ));
+		Vhffs::Robots::vhffs_log( sprintf( "Remain mail for group %s before delete" , $group->get_groupname ));
         $object->set_status( Vhffs::Constants::TO_DELETE );
 		if( $object->commit < 0 )
 		{
-			vhffs_log( "Error in delete group" );
+			Vhffs::Robots::vhffs_log( "Error in delete group" );
 		}
    }
 
 
 	if( $ok == 1 )
 	{
-		vhffs_log( sprintf( "Delete group %s" , $group->get_groupname ));
+		Vhffs::Robots::vhffs_log( sprintf( "Delete group %s" , $group->get_groupname ));
 		Vhffs::Robots::Group::delete( $vhffs , $group );
 	}
 	else
 	{
-		vhffs_log( sprintf( "Cannot elete group %s, items remains" , $group->get_groupname ));
+		Vhffs::Robots::vhffs_log( sprintf( "Cannot elete group %s, items remains" , $group->get_groupname ));
 	}
 
 }

Modified: trunk/vhffs-robots/src/delete_mail.pl
==============================================================================
--- trunk/vhffs-robots/src/delete_mail.pl (original)
+++ trunk/vhffs-robots/src/delete_mail.pl Thu Dec 15 20:45:38 2005
@@ -20,7 +20,7 @@
     my $lists = Vhffs::Services::Mailing::getall( $main , undef , undef , undef , $mail->get_domain );
 	if( defined $lists )
 	{
-		vhffs_log( sprintf( "Cannot delete mail domain %s, remains lists" , $mail->get_domain ) );
+		Vhffs::Robots::vhffs_log( sprintf( "Cannot delete mail domain %s, remains lists" , $mail->get_domain ) );
 		foreach $list ( @{$lists} )
 		{
 			$list->set_status( Vhffs::Constants::TO_DELETE );
@@ -29,7 +29,7 @@
 	}
 	else
 	{
-		vhffs_log( sprintf( "Delete mail domain %s" , $mail->get_domain ) );
+		Vhffs::Robots::vhffs_log( sprintf( "Delete mail domain %s" , $mail->get_domain ) );
 		$mail->delete;
 	}
 }

Modified: trunk/vhffs-robots/src/delete_ml.pl
==============================================================================
--- trunk/vhffs-robots/src/delete_ml.pl (original)
+++ trunk/vhffs-robots/src/delete_ml.pl Thu Dec 15 20:45:38 2005
@@ -16,11 +16,11 @@
 {
 	if( $ml->delete < 0 )
 	{
-		vhffs_log( sprintf( "Cannot delete list %s" , $ml->get_listname ) );
+		Vhffs::Robots::vhffs_log( sprintf( "Cannot delete list %s" , $ml->get_listname ) );
 	}
 	else
 	{
-		vhffs_log( sprintf( "Delete list %s" , $ml->get_listname ) );
+		Vhffs::Robots::vhffs_log( sprintf( "Delete list %s" , $ml->get_listname ) );
 	}
 }
 

Modified: trunk/vhffs-robots/src/delete_mysql.pl
==============================================================================
--- trunk/vhffs-robots/src/delete_mysql.pl (original)
+++ trunk/vhffs-robots/src/delete_mysql.pl Thu Dec 15 20:45:38 2005
@@ -16,11 +16,11 @@
 {
 	if( Vhffs::Robots::Mysql::delete_db( $main , $db ) < 0 )
 	{
-		vhffs_log( sprintf( "Cannot delete MySQL database %s" , $db->get_dbname ));
+		Vhffs::Robots::vhffs_log( sprintf( "Cannot delete MySQL database %s" , $db->get_dbname ));
 	}
 	else
 	{
-		vhffs_log( sprintf( "Delete MySQL database %s" , $db->get_dbname ));
+		Vhffs::Robots::vhffs_log( sprintf( "Delete MySQL database %s" , $db->get_dbname ));
 	}
 }
 

Modified: trunk/vhffs-robots/src/delete_pgsql.pl
==============================================================================
--- trunk/vhffs-robots/src/delete_pgsql.pl (original)
+++ trunk/vhffs-robots/src/delete_pgsql.pl Thu Dec 15 20:45:38 2005
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-use Vhffs::Robots qw( vhffs_log lock unlock );
+use Vhffs::Robots qw( Vhffs::Robots::vhffs_log lock unlock );
 use Vhffs::Services::Postgres;
 use Vhffs::Robots::Postgres;
 use Vhffs::Main;
@@ -17,11 +17,11 @@
 {
 	if(  Vhffs::Robots::Postgres::delete_db( $main , $db ) < 0 )
 	{
-		vhffs_log( sprintf( "Cannot delete PostgreSQL database %s" , $db->get_dbname ));
+		Vhffs::Robots::vhffs_log( sprintf( "Cannot delete PostgreSQL database %s" , $db->get_dbname ));
 	}
 	else
 	{
-		vhffs_log( sprintf( "Delete PostgreSQL database %s" , $db->get_dbname ));
+		Vhffs::Robots::vhffs_log( sprintf( "Delete PostgreSQL database %s" , $db->get_dbname ));
 	}
 }
 

Modified: trunk/vhffs-robots/src/delete_svn.pl
==============================================================================
--- trunk/vhffs-robots/src/delete_svn.pl (original)
+++ trunk/vhffs-robots/src/delete_svn.pl Thu Dec 15 20:45:38 2005
@@ -17,19 +17,19 @@
 	{
 		if( Vhffs::Robots::Svn::delete_repo( $vhffs , $svn ) < 0 )
 		{
-			vhffs_log( sprintf( "Delete files from SVN repository %s" , $svn->get_reponame ));
+			Vhffs::Robots::vhffs_log( sprintf( "Delete files from SVN repository %s" , $svn->get_reponame ));
 		}
 		else
 		{
-			vhffs_log( sprintf( "Cannot delete files from SVN repository %s" , $svn->get_reponame ));
+			Vhffs::Robots::vhffs_log( sprintf( "Cannot delete files from SVN repository %s" , $svn->get_reponame ));
 		}
 		if( $svn->delete < 0 )
 		{
-			vhffs_log( sprintf( "Cannot delete SVN repository object %s" , $svn->get_reponame ));
+			Vhffs::Robots::vhffs_log( sprintf( "Cannot delete SVN repository object %s" , $svn->get_reponame ));
 		}
 		else
 		{
-			vhffs_log( sprintf( "Delete SVN repository object %s" , $svn->get_reponame ));
+			Vhffs::Robots::vhffs_log( sprintf( "Delete SVN repository object %s" , $svn->get_reponame ));
 		}
 	}
 }

Modified: trunk/vhffs-robots/src/delete_users.pl
==============================================================================
--- trunk/vhffs-robots/src/delete_users.pl (original)
+++ trunk/vhffs-robots/src/delete_users.pl Thu Dec 15 20:45:38 2005
@@ -24,7 +24,7 @@
 		{
 			foreach $group ( @{$groups} )
 			{
-				vhffs_log( sprintf("Delete %s, remains group(s) : will delete %s " , $user->get_username , $group->get_groupname ) );
+				Vhffs::Robots::vhffs_log( sprintf("Delete %s, remains group(s) : will delete %s " , $user->get_username , $group->get_groupname ) );
 				if( $group->get_owneruid == $user->get_uid )
 				{
 					$ok = 0;
@@ -39,25 +39,25 @@
 			printf "\tSuppression du user\n";
         	if( Vhffs::Robots::User::delete( $vhffs, $user ) < 0 )
 			{
-				vhffs_log( sprintf("Cannot delete user files %s" , $user->get_username ) );
+				Vhffs::Robots::vhffs_log( sprintf("Cannot delete user files %s" , $user->get_username ) );
 			}
 			else
 			{
-				vhffs_log( sprintf("Delete user files %s" , $user->get_username ) );
+				Vhffs::Robots::vhffs_log( sprintf("Delete user files %s" , $user->get_username ) );
 			}
 
 			if( $user->delete < 0 )
 			{
-				vhffs_log( sprintf("Cannot delete object files %s" , $user->get_username ) );
+				Vhffs::Robots::vhffs_log( sprintf("Cannot delete object files %s" , $user->get_username ) );
 			}
 			else
 			{
-				vhffs_log( sprintf("Delete user object %s" , $user->get_username ) );
+				Vhffs::Robots::vhffs_log( sprintf("Delete user object %s" , $user->get_username ) );
 			}
 		}
 		else
 		{
-			vhffs_log( sprintf("Cannot remove user %s, remains group(s)" , $user->get_username ) );
+			Vhffs::Robots::vhffs_log( sprintf("Cannot remove user %s, remains group(s)" , $user->get_username ) );
 		}
     }
 }

Modified: trunk/vhffs-robots/src/delete_web.pl
==============================================================================
--- trunk/vhffs-robots/src/delete_web.pl (original)
+++ trunk/vhffs-robots/src/delete_web.pl Thu Dec 15 20:45:38 2005
@@ -17,11 +17,11 @@
 {
 	if( Vhffs::Robots::Web::delete( $main , $web ) < 0 )
 	{
-		vhffs_log( "Cannot delete web %s" , $web->get_servername );
+		Vhffs::Robots::vhffs_log( "Cannot delete web %s" , $web->get_servername );
 	}
 	else
 	{
-		vhffs_log( "Delete web %s" , $web->get_servername );
+		Vhffs::Robots::vhffs_log( "Delete web %s" , $web->get_servername );
 	}
 }
 

Modified: trunk/vhffs-robots/src/fix_quota.pl
==============================================================================
--- trunk/vhffs-robots/src/fix_quota.pl (original)
+++ trunk/vhffs-robots/src/fix_quota.pl Thu Dec 15 20:45:38 2005
@@ -6,7 +6,7 @@
 use locale;
 use Locale::gettext;
 use Vhffs::Main;
-use Vhffs::Robots qw( vhffs_log lock unlock);
+use Vhffs::Robots qw( Vhffs::Robots::vhffs_log lock unlock);
 use Vhffs::Group;
 
 Vhffs::Robots::lock();
@@ -28,7 +28,7 @@
 		{
 			$cmd = "/usr/sbin/setquota -g ".$group->get_gid ." ".$blocks." ".$blocks." ".$inodes." ".$inodes." -a ".$group->{'main'}->get_config->get_datadir;
 			system( $cmd );
-			vhffs_log( sprintf( "Update quota for group %s set %s" , $group->get_groupname , $group->get_quota ) );
+			Vhffs::Robots::vhffs_log( sprintf( "Update quota for group %s set %s" , $group->get_groupname , $group->get_quota ) );
 		}
 	}
 }

Modified: trunk/vhffs-robots/src/mailing.pl
==============================================================================
--- trunk/vhffs-robots/src/mailing.pl (original)
+++ trunk/vhffs-robots/src/mailing.pl Thu Dec 15 20:45:38 2005
@@ -24,7 +24,7 @@
 
 if( ! defined $from )
 {
-	vhffs_log( "Cannot send mailing, from is not present in config file" );
+	Vhffs::Robots::vhffs_log( "Cannot send mailing, from is not present in config file" );
 	Vhffs::Robots::unlock;
 	exit( -1 );
 }

Modified: trunk/vhffs-robots/src/modify_mysql.pl
==============================================================================
--- trunk/vhffs-robots/src/modify_mysql.pl (original)
+++ trunk/vhffs-robots/src/modify_mysql.pl Thu Dec 15 20:45:38 2005
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-use Vhffs::Robots qw( lock , unlock , vhffs_log);
+use Vhffs::Robots qw( lock , unlock , Vhffs::Robots::vhffs_log);
 use Vhffs::Robots::Mysql;
 use Vhffs::Services::Mysql;
 use Vhffs::Main;
@@ -16,11 +16,11 @@
 {
         if( Vhffs::Robots::Mysql::update_db( $main , $db ) < 0 )
 		{
-			vhffs_log( "Error while update MySQL database" );
+			Vhffs::Robots::vhffs_log( "Error while update MySQL database" );
 		}
 		else
 		{
-			vhffs_log( sprintf( "Update MySQL database %s" , $db->get_dbname ) );
+			Vhffs::Robots::vhffs_log( sprintf( "Update MySQL database %s" , $db->get_dbname ) );
 		}
 }
 

Modified: trunk/vhffs-robots/src/parse_httplog.pl
==============================================================================
--- trunk/vhffs-robots/src/parse_httplog.pl (original)
+++ trunk/vhffs-robots/src/parse_httplog.pl Thu Dec 15 20:45:38 2005
@@ -6,7 +6,7 @@
 #Your logs must be in format : "%V %h %l %u %t \"%r\" %>s %b"
 #So, add in your httpd.conf following lines :
 #LogFormat "%V %h %l %u %t \"%r\" %>s %b" vhffs
-#CustomLog /var/log/apache2/vhffs_log vhffs
+#CustomLog /var/log/apache2/Vhffs::Robots::vhffs_log vhffs
 
 use strict;
 

Modified: trunk/vhffs-robots/src/user_group.pl
==============================================================================
--- trunk/vhffs-robots/src/user_group.pl (original)
+++ trunk/vhffs-robots/src/user_group.pl Thu Dec 15 20:45:38 2005
@@ -30,22 +30,22 @@
 		{
 			if( Vhffs::Robots::Group::add_user( $user , $group , $vhffs ) < 0 )
 			{
-				vhffs_log( sprintf( "Error adding user %s to group %s" , $user->get_username , $group->get_groupname ));
+				Vhffs::Robots::vhffs_log( sprintf( "Error adding user %s to group %s" , $user->get_username , $group->get_groupname ));
 			}
 			else
 			{
-				vhffs_log( sprintf( "Add user %s to group %s" , $user->get_username , $group->get_groupname ));
+				Vhffs::Robots::vhffs_log( sprintf( "Add user %s to group %s" , $user->get_username , $group->get_groupname ));
 			}
 			
 		}
 		else
 		{
-			vhffs_log( sprintf( "Cannot get user %s" , $_ ));
+			Vhffs::Robots::vhffs_log( sprintf( "Cannot get user %s" , $_ ));
 		}
 	}
 	else
 	{
-		vhffs_log( sprintf( "Cannot get user %s" , $_ ));
+		Vhffs::Robots::vhffs_log( sprintf( "Cannot get user %s" , $_ ));
 	}
 }
 }
@@ -71,18 +71,18 @@
 
 		if( ( defined $user ) && ( $user->fetch > 0 ) )
 		{
-			vhffs_log( sprintf( "Remove user %s from group %s" , $user->get_username , $group->get_groupname ));
+			Vhffs::Robots::vhffs_log( sprintf( "Remove user %s from group %s" , $user->get_username , $group->get_groupname ));
 			Vhffs::Robots::Group::del_user( $user , $group , $vhffs );
 			
 		}
 		else
 		{
-			vhffs_log( sprintf( "Cannot get user %s" , $name ));
+			Vhffs::Robots::vhffs_log( sprintf( "Cannot get user %s" , $name ));
 		}
 	}
 	else
 	{
-		vhffs_log( sprintf( "Cannot get group %s" , $_ ));
+		Vhffs::Robots::vhffs_log( sprintf( "Cannot get group %s" , $_ ));
 	}
 }
 




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/