put in paths to the appropriate interactive command, did not pick up when running under the daemon
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8815 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
78e217be96
commit
448b54da49
@ -276,16 +276,22 @@ sub runmysqlcmd
|
||||
my ($prefix, $dbname) = split('=', $front);
|
||||
my ($host, $admin, $passwd) = split('\|', $back);
|
||||
my ($hostind, $hostname) = split('=', $host);
|
||||
|
||||
|
||||
my $rc = 0;
|
||||
if (!(-e $file)) { # file does not exist
|
||||
xCAT::MsgUtils->message("SE",
|
||||
"The file:$file does not exist. ");
|
||||
return;
|
||||
}
|
||||
|
||||
# set correct path to the mysql cmd
|
||||
my $mysql;
|
||||
if (xCAT::Utils->isAIX()) {
|
||||
$mysql="/usr/local/mysql/bin/mysql";
|
||||
} else {
|
||||
$mysql="/usr/bin/mysql";
|
||||
}
|
||||
my $cmd =
|
||||
"mysql --user=$admin --password=$passwd --host=$hostname $dbname \< $file ";
|
||||
"$mysql --user=$admin --password=$passwd --host=$hostname $dbname \< $file ";
|
||||
#xCAT::MsgUtils->message("SI", "Running mysql --user=$admin --host=$hostname $dbname $file ");
|
||||
system("$cmd");
|
||||
|
||||
@ -324,8 +330,15 @@ sub runpgsqlcmd
|
||||
"The file:$file does not exist. ");
|
||||
return;
|
||||
}
|
||||
# set correct path to the psql cmd
|
||||
my $psql;
|
||||
if (xCAT::Utils->isAIX()) {
|
||||
$psql="/var/lib/pgsql/bin/psql";
|
||||
} else {
|
||||
$psql="/usr/bin/psql";
|
||||
}
|
||||
my $cmd =
|
||||
"PGPASSWORD=$passwd psql -d $dbname -h $hostname -U $admin -f $file ";
|
||||
"PGPASSWORD=$passwd $psql -d $dbname -h $hostname -U $admin -f $file ";
|
||||
#xCAT::MsgUtils->message("SI", "Running psql -d $dbname -h $hostname -U $admin -f $file ");
|
||||
system("$cmd");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user