[Fusionforge-commits] r9512 - trunk/plugins/templates/helloworld/bin

Christian Bayle cbayle at libremir.placard.fr.eu.org
Fri Apr 16 16:50:14 CEST 2010


Author: cbayle
Date: 2010-04-16 16:50:14 +0200 (Fri, 16 Apr 2010)
New Revision: 9512

Modified:
   trunk/plugins/templates/helloworld/bin/db-delete.pl
   trunk/plugins/templates/helloworld/bin/db-upgrade.pl
   trunk/plugins/templates/helloworld/bin/sayhello
Log:
Fix db upgrade and exec rights



Property changes on: trunk/plugins/templates/helloworld/bin/db-delete.pl
___________________________________________________________________
Added: svn:executable
   + *

Modified: trunk/plugins/templates/helloworld/bin/db-upgrade.pl
===================================================================
--- trunk/plugins/templates/helloworld/bin/db-upgrade.pl	2010-04-16 14:42:41 UTC (rev 9511)
+++ trunk/plugins/templates/helloworld/bin/db-upgrade.pl	2010-04-16 14:50:14 UTC (rev 9512)
@@ -48,7 +48,7 @@
     $version = &get_db_version ;
     $target = "0.1" ;
     if (is_lesser $version, $target) {
-	my @filelist = ( "/usr/share/gforge/plugins/$pluginname/lib/$pluginname-init.sql" ) ;
+	my @filelist = ( "/usr/share/gforge/plugins/$pluginname/db/$pluginname-init.sql" ) ;
 	
 	foreach my $file (@filelist) {
 	    debug "Processing $file" ;
@@ -69,32 +69,32 @@
 	$dbh->commit () ;
     }
     
-    $version = &get_db_version ;
-    $target = "0.2" ;
-    if (is_lesser $version, $target) {
-	debug "Adding local data." ;
-	
-	do "/etc/gforge/local.pl" or die "Cannot read /etc/gforge/local.pl" ;
-	
-	my $ip_address = qx/host $domain_name | awk '{print \}'/ ;
-	
-	@reqlist = (
-		    "INSERT INTO plugin_".$pluginname."_sample_data (domain, ip_address) VALUES ('$domain_name', '$ip_address')",
-		    ) ;
-	
-	foreach my $s (@reqlist) {
-	    $query = $s ;
-	    # debug $query ;
-	    $sth = $dbh->prepare ($query) ;
-	    $sth->execute () ;
-	    $sth->finish () ;
-	}
-	@reqlist = () ;
-	
-	&update_db_version ($target) ;
-	debug "Committing." ;
-	$dbh->commit () ;
-    }
+#    $version = &get_db_version ;
+#    $target = "0.2" ;
+#    if (is_lesser $version, $target) {
+#	debug "Adding local data." ;
+#	
+#	do "/etc/gforge/local.pl" or die "Cannot read /etc/gforge/local.pl" ;
+#	
+#	my $ip_address = qx/host $domain_name | awk '{print \}'/ ;
+#	
+#	@reqlist = (
+#		    "INSERT INTO plugin_".$pluginname."_sample_data (domain, ip_address) VALUES ('$domain_name', '$ip_address')",
+#		    ) ;
+#	
+#	foreach my $s (@reqlist) {
+#	    $query = $s ;
+#	    # debug $query ;
+#	    $sth = $dbh->prepare ($query) ;
+#	    $sth->execute () ;
+#	    $sth->finish () ;
+#	}
+#	@reqlist = () ;
+#	
+#	&update_db_version ($target) ;
+#	debug "Committing." ;
+#	$dbh->commit () ;
+#    }
 
     debug "It seems your database install/upgrade went well and smoothly.  That's cool." ;
     debug "Please enjoy using Debian FusionForge." ;


Property changes on: trunk/plugins/templates/helloworld/bin/db-upgrade.pl
___________________________________________________________________
Added: svn:executable
   + *


Property changes on: trunk/plugins/templates/helloworld/bin/sayhello
___________________________________________________________________
Added: svn:executable
   + *




More information about the Fusionforge-commits mailing list