[MOBY-guts] biomoby commit
Eddie Kawas
kawas at dev.open-bio.org
Fri Jun 20 15:53:52 UTC 2008
kawas
Fri Jun 20 11:53:52 EDT 2008
Update of /home/repository/moby/moby-live/Perl/MOBY-Server/bin/scripts
In directory dev.open-bio.org:/tmp/cvs-serv22549/Perl/MOBY-Server/bin/scripts
Modified Files:
moby-s-install.pl
Log Message:
moby-live/Perl/MOBY-Server/bin/scripts moby-s-install.pl,1.8,1.9
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/bin/scripts/moby-s-install.pl,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- /home/repository/moby/moby-live/Perl/MOBY-Server/bin/scripts/moby-s-install.pl 2008/06/20 15:31:37 1.8
+++ /home/repository/moby/moby-live/Perl/MOBY-Server/bin/scripts/moby-s-install.pl 2008/06/20 15:53:52 1.9
@@ -35,6 +35,11 @@
my $s = join "", @_;
return qq|GRANT ALL ON $s TO ?\@'localhost' IDENTIFIED BY ? WITH GRANT OPTION|;
}
+ sub prepare_query_no_password {
+ my $s = join "", @_;
+ return qq|GRANT ALL ON $s TO ?\@'localhost' WITH GRANT OPTION|;
+ }
+
sub check_module {
eval "require $_[0]";
if ($@) {
@@ -980,8 +985,13 @@
};
eval {
my $db = $dbsections{mobycentral} . ".*";
- $dbh->do(prepare_query($db),undef,$moby_username,$moby_password)
- || say ("Could not give '$moby_username' access to $db - Error:\n$DBI::errstr");
+ if ($moby_password) {
+ $dbh->do(prepare_query($db),undef,$moby_username,$moby_password)
+ || say ("Could not give '$moby_username' access to $db - Error:\n$DBI::errstr");
+ } else {
+ $dbh->do(prepare_query_no_password($db),undef,$moby_username)
+ || say ("Could not give '$moby_username' access to $db - Error:\n$DBI::errstr");
+ }
};
die $! if $!;
system( "mysql -h $url -P $port -u $username --password=$password "
@@ -1003,8 +1013,13 @@
};
eval {
my $db = $dbsections{mobyobject} . ".*";
- $dbh->do(prepare_query($db),undef,$moby_username,$moby_password)
- || say ("Could not give '$moby_username' access to $db - Error:\n$DBI::errstr");
+ if ($moby_password) {
+ $dbh->do(prepare_query($db),undef,$moby_username,$moby_password)
+ || say ("Could not give '$moby_username' access to $db - Error:\n$DBI::errstr");
+ } else {
+ $dbh->do(prepare_query_no_password($db),undef,$moby_username)
+ || say ("Could not give '$moby_username' access to $db - Error:\n$DBI::errstr");
+ }
};
system( "mysql -h $url -P $port -u $username --password=$password "
. $dbsections{mobyobject}
@@ -1025,8 +1040,13 @@
};
eval {
my $db = $dbsections{mobyservice} . ".*";
- $dbh->do(prepare_query($db),undef,$moby_username,$moby_password)
- || say ("Could not give '$moby_username' access to $db - Error:\n$DBI::errstr");
+ if ($moby_password) {
+ $dbh->do(prepare_query($db),undef,$moby_username,$moby_password)
+ || say ("Could not give '$moby_username' access to $db - Error:\n$DBI::errstr");
+ } else {
+ $dbh->do(prepare_query_no_password($db),undef,$moby_username)
+ || say ("Could not give '$moby_username' access to $db - Error:\n$DBI::errstr");
+ }
};
system( "mysql -h $url -P $port -u $username --password=$password "
. $dbsections{mobyservice}
@@ -1047,8 +1067,13 @@
};
eval {
my $db = $dbsections{mobynamespace} . ".*";
- $dbh->do(prepare_query($db),undef,$moby_username,$moby_password)
- || say ("Could not give '$moby_username' access to $db - Error:\n$DBI::errstr");
+ if ($moby_password) {
+ $dbh->do(prepare_query($db),undef,$moby_username,$moby_password)
+ || say ("Could not give '$moby_username' access to $db - Error:\n$DBI::errstr");
+ } else {
+ $dbh->do(prepare_query_no_password($db),undef,$moby_username)
+ || say ("Could not give '$moby_username' access to $db - Error:\n$DBI::errstr");
+ }
};
system( "mysql -h $url -P $port -u $username --password=$password "
. $dbsections{mobynamespace}
@@ -1069,8 +1094,13 @@
};
eval {
my $db = $dbsections{mobyrelationship} . ".*";
- $dbh->do(prepare_query($db),undef,$moby_username,$moby_password)
- || say ("Could not give '$moby_username' access to $db - Error:\n$DBI::errstr");
+ if ($moby_password) {
+ $dbh->do(prepare_query($db),undef,$moby_username,$moby_password)
+ || say ("Could not give '$moby_username' access to $db - Error:\n$DBI::errstr");
+ } else {
+ $dbh->do(prepare_query_no_password($db),undef,$moby_username)
+ || say ("Could not give '$moby_username' access to $db - Error:\n$DBI::errstr");
+ }
};
system( "mysql -h $url -P $port -u $username --password=$password "
. $dbsections{mobyrelationship}
More information about the MOBY-guts
mailing list