put odbcsetup in front of all syslog messages to be able to more easily find them in the syslog during debug

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8458 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
lissav 2010-12-19 12:17:42 +00:00
parent c550bf7b96
commit da0b6e5dd1

View File

@ -54,7 +54,7 @@ my $msg;
my $dbname = xCAT::Utils->get_DBName;
if ($dbname eq "DB2")
{
$msg = "Setting up ODBC for DB2";
$msg = "odbcsetup:Setting up ODBC for DB2";
`logger -t xcat $msg`;
&setupdb2odbc;
@ -63,14 +63,14 @@ else
{
if ($dbname eq "MYSQL")
{
$msg = "Setting up ODBC for MYSQL";
$msg = "odbcsetup:Setting up ODBC for MYSQL";
`logger -t xcat $msg`;
&setupmysqlodbc;
}
else
{
$msg =
"cfgloc file does not contain MySQL or DB2, will not setup ODBC.";
"odbcsetup:cfgloc file does not contain MySQL or DB2, will not setup ODBC.";
`logger -t xcat $msg`;
exit 1;
}
@ -104,12 +104,12 @@ sub setupdb2odbc
chomp $xcatcfg;
my ($database, $instance, $password) = split('\|', $xcatcfg);
$cmd = "$::XCATROOT/bin/db2sqlsetup -o -C";
$msg = "$::sdate Running Client ODBC setup. $cmd\n";
$msg = "odbcsetup:Running Client ODBC setup. $cmd\n";
`logger -t xcat $msg`;
$rc = &runcmd($cmd);
$msg = "$::sdate Client ODBC setup finished.\n";
$msg = "odbcsetup: Client ODBC setup finished.\n";
`logger -t xcat $msg`;
return $rc;
@ -127,12 +127,12 @@ sub setupmysqlodbc
my $rc = 0;
my $cmd;
$cmd = "$::XCATROOT/bin/mysqlsetup -o";
$msg = "$::sdate Running Client ODBC setup. $cmd\n";
$msg = "odbcsetup: Running Client ODBC setup. $cmd\n";
`logger -t xcat $msg`;
$rc = &runcmd($cmd);
$msg = "$::sdate Client ODBC setup finished.\n";
$msg = "odbcsetup: Client ODBC setup finished.\n";
`logger -t xcat $msg`;
return $rc;
@ -159,7 +159,7 @@ sub runcmd
$rc = $? >> 8;
if ($rc > 0)
{
my $msg = "$cmd returned rc=$rc $::outref\n";
my $msg = "odbcsetup:$cmd returned rc=$rc $::outref\n";
`logger -t xcat $msg`;
return 1;
}