mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-29 09:13:08 +00:00
failed to check postgresql package and ids
This commit is contained in:
parent
9c6de4b1c3
commit
0240e7a444
@ -164,7 +164,7 @@ if ($::RUNCMD_RC != 0)
|
||||
#
|
||||
# check to see if postgresql is installed
|
||||
#
|
||||
my $cmd = "rpm -qa | grep postgresql";
|
||||
my $cmd = "rpm -q postgresql";
|
||||
if ($debianflag){
|
||||
$cmd = "dpkg -l | grep postgresql | awk '{print \$2}'";
|
||||
}
|
||||
@ -179,6 +179,20 @@ if ($::RUNCMD_RC != 0)
|
||||
xCAT::MsgUtils->message("E", " $cmd failed. $message");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
#
|
||||
#check to see if postgres user is created
|
||||
#
|
||||
my $cmd = "id postgres";
|
||||
my @output=xCAT::Utils->runcmd($cmd, 0);
|
||||
if ($::RUNCMD_RC != 0)
|
||||
{
|
||||
my $message = "\nPostgreSQL user is not created, please make sure postgresql-server packages are installed.";
|
||||
|
||||
xCAT::MsgUtils->message("E", " $cmd failed. $message");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
# check if 9.X release not built by us is installed, setup different
|
||||
# SLES used default dir
|
||||
if ( (grep(/postgresql9/, @output)) && ($::linuxos !~ /sles/) ){ # postgresql 9.x
|
||||
|
Loading…
x
Reference in New Issue
Block a user