spacewalk/admin/rhn-populate-database.pl | 24 ++++--------------------
spacewalk/setup/lib/Spacewalk/Setup.pm | 2 --
2 files changed, 4 insertions(+), 22 deletions(-)
New commits:
commit e22f751025e770e425321a5517accf1bf3acd48d
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Thu Aug 26 14:50:51 2010 +0200
As we never fork now, the --nofork is obsolete, removing.
diff --git a/spacewalk/admin/rhn-populate-database.pl
b/spacewalk/admin/rhn-populate-database.pl
index dea334a..fd2d830 100755
--- a/spacewalk/admin/rhn-populate-database.pl
+++ b/spacewalk/admin/rhn-populate-database.pl
@@ -31,7 +31,7 @@ use Symbol qw(gensym);
my $usage = "usage: $0 [ --host=<databaseHost> [ --port=<port> ] ]
--database=<databaseName> \\\n"
. " --user=<username> --password=<password>
--schema-deploy-file=<filename> \\\n"
- . " [ --log=<logfile> ] [ --clear-db ] [ --nofork ] [ --postgresql ] [
--help ]\n";
+ . " [ --log=<logfile> ] [ --clear-db ] [ --postgresql ] [ --help ]\n";
my $user = '';
my $password = '';
@@ -42,7 +42,6 @@ my $port = '';
my $schema_deploy_file = '';
my $log_file;
my $clear_db = 0;
-my $nofork = 0;
my $postgresql = 0;
my $help = '';
@@ -50,7 +49,7 @@ GetOptions("host=s" => \$host, "port=s" =>
\$port,
"user=s" => \$user, "password=s" => \$password,
"database=s" => \$database, "schema-deploy-file=s" =>
\$schema_deploy_file,
"log=s" => \$log_file, "help" => \$help,
"clear-db" => \$clear_db,
- "postgresql" => \$postgresql, nofork => \$nofork);
+ "postgresql" => \$postgresql);
if ($help
or not ($user and $password and $database and $schema_deploy_file)) {
diff --git a/spacewalk/setup/lib/Spacewalk/Setup.pm
b/spacewalk/setup/lib/Spacewalk/Setup.pm
index 636938e..3896789 100644
--- a/spacewalk/setup/lib/Spacewalk/Setup.pm
+++ b/spacewalk/setup/lib/Spacewalk/Setup.pm
@@ -824,7 +824,6 @@ sub postgresql_populate_db {
sprintf('--host=%s', @{$answers}{'db-host'}),
sprintf('--port=%s', @{$answers}{'db-port'}),
sprintf("--schema-deploy-file=$sat_schema_deploy"),
- sprintf('--nofork'),
sprintf('--postgresql'),
);
@@ -1309,7 +1308,6 @@ sub oracle_populate_db {
sprintf('--database=%s', @{$answers}{'db-name'}),
sprintf('--host=%s', @{$answers}{'db-host'}),
sprintf("--schema-deploy-file=$sat_schema_deploy"),
- sprintf('--nofork'),
);
commit c40d2388ef55418ce4acbfd173890efd1d945f9b
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Thu Aug 26 14:49:39 2010 +0200
We do not call the schema population from WebUI, no forking.
diff --git a/spacewalk/admin/rhn-populate-database.pl
b/spacewalk/admin/rhn-populate-database.pl
index 28332f8..dea334a 100755
--- a/spacewalk/admin/rhn-populate-database.pl
+++ b/spacewalk/admin/rhn-populate-database.pl
@@ -87,18 +87,6 @@ if (defined $log_file and -e $log_file) {
}
}
-my $pid;
-
-unless ($nofork) {
- $pid = fork();
-}
-
-# The parent process will exit so the child can do the work without
-# blocking the web UI.
-if ($pid) {
- exit 0;
-}
-
if ($clear_db) {
RHN::SatInstall->clear_db();
}
@@ -121,6 +109,8 @@ if ($postgresql) {
@command = ( 'sqlplus', "$user/$password\@$database",
"\@$schema_deploy_file" );
}
+my $pid;
+
if (defined $log_file) {
local *LOGFILE;
open(LOGFILE, ">", $log_file) or die "Error writing log file
'$log_file': $OS_ERROR";
commit cc7ac454d6f9636652e97df238b753ff03373e83
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Thu Aug 26 14:46:45 2010 +0200
The dbhome is not needed as we are using the InstantClient sqlplus.
diff --git a/spacewalk/admin/rhn-populate-database.pl
b/spacewalk/admin/rhn-populate-database.pl
index 7e98d11..28332f8 100755
--- a/spacewalk/admin/rhn-populate-database.pl
+++ b/spacewalk/admin/rhn-populate-database.pl
@@ -57,11 +57,6 @@ if ($help
die $usage;
}
-if (not $postgresql) {
- my $ORACLE_HOME = qx{dbhome '*'};
- $ENV{PATH} .= ":$ORACLE_HOME/bin";
-}
-
our $lockfile = '/var/lock/subsys/rhn-satellite-db-population';
if (-e $lockfile) {
warn "lock file $lockfile present...database population already in
progress\n";