schema/spacewalk/spacewalk-schema-upgrade | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
New commits:
commit 82becb53858e11f99ded3e9aab1d401576cd447b
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Thu Jul 29 14:58:30 2010 +0200
The default_db is gone, we need to set the string up for sqlplus to work in
spacewalk-schema-upgrade.
diff --git a/schema/spacewalk/spacewalk-schema-upgrade
b/schema/spacewalk/spacewalk-schema-upgrade
index 8b7a67a..52e240f 100755
--- a/schema/spacewalk/spacewalk-schema-upgrade
+++ b/schema/spacewalk/spacewalk-schema-upgrade
@@ -18,7 +18,11 @@ if (not -e $config_file) {
my %options;
Spacewalk::Setup::read_config($config_file, \%options);
if (not defined $options{default_db}) {
- die "Config file [$config_file] does not seem to have database connection string
(default_db) set.\n";
+ if (defined $options{'db_name'} and defined $options{'db_user'} and
defined $options{'db_password'}) {
+ $options{default_db} =
"$options{'db_user'}/$options{'db_password'}\@$options{'db_name'}";
+ } else {
+ die "Config file [$config_file] does not seem to have database connection string
(default_db) set.\n";
+ }
}
my $test = run_query(\%options, "select 1, 2 from dual;");
Show replies by thread