From da0b6e5dd1770a6ae9923aa0fd8540ac389b058f Mon Sep 17 00:00:00 2001 From: lissav Date: Sun, 19 Dec 2010 12:17:42 +0000 Subject: [PATCH] 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 --- xCAT/postscripts/odbcsetup | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/xCAT/postscripts/odbcsetup b/xCAT/postscripts/odbcsetup index 34e956084..75fa63bc8 100755 --- a/xCAT/postscripts/odbcsetup +++ b/xCAT/postscripts/odbcsetup @@ -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; }