From 8f3df21db1e02b63eb6a39e6d1e181372bc01377 Mon Sep 17 00:00:00 2001 From: lissav Date: Thu, 26 Aug 2010 13:36:11 +0000 Subject: [PATCH] update with msgs to syslog git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7253 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/sbin/runsqlcmd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xCAT-server/sbin/runsqlcmd b/xCAT-server/sbin/runsqlcmd index c7c44c2f3..65b2f4d9b 100755 --- a/xCAT-server/sbin/runsqlcmd +++ b/xCAT-server/sbin/runsqlcmd @@ -163,7 +163,6 @@ sub rundb2cmd my @output = xCAT::Utils->runcmd($cmd, 0); if ($::RUNCMD_RC != 0) { - my $rsp = {}; xCAT::MsgUtils->message("SE", "$cmd failed"); return; } @@ -173,7 +172,6 @@ sub rundb2cmd @output = xCAT::Utils->runcmd($cmd, 0); if ($::RUNCMD_RC != 0) { - my $rsp = {}; xCAT::MsgUtils->message("SE", "$cmd failed"); return; } @@ -183,6 +181,7 @@ sub rundb2cmd $cmd .= "$tmpfile"; $cmd .= ' 2>&1'; $cmd .= "\'"; + xCAT::MsgUtils->message("SI", "Running su - xcatdb -c $cmd "); system("su - xcatdb -c $cmd"); if ($? > 0) # error @@ -195,7 +194,6 @@ sub rundb2cmd @output = xCAT::Utils->runcmd($cmd, 0); if ($::RUNCMD_RC != 0) { - my $rsp = {}; xCAT::MsgUtils->message("SE", "$cmd failed"); return; } @@ -225,6 +223,7 @@ sub runmysqlcmd my $rc = 0; my $cmd = "mysql --user=$admin --password=$passwd --host=$hostname $dbname \< $file "; + xCAT::MsgUtils->message("SI", "Running mysql --user=$admin --host=$hostname $dbname $file "); system("$cmd"); if ($? > 0) # error @@ -259,6 +258,7 @@ sub runpgsqlcmd my $rc = 0; my $cmd = "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"); if ($? > 0) # error