From 953f01b3f8804f26989087e92eeaa8313f7e1e78 Mon Sep 17 00:00:00 2001 From: jjhua Date: Tue, 22 Jan 2013 08:30:27 +0000 Subject: [PATCH] fixed bug 3300 git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14941 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/perl/xCAT/Template.pm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/xCAT-server/lib/perl/xCAT/Template.pm b/xCAT-server/lib/perl/xCAT/Template.pm index 70f998a5d..f2d563820 100644 --- a/xCAT-server/lib/perl/xCAT/Template.pm +++ b/xCAT-server/lib/perl/xCAT/Template.pm @@ -616,7 +616,7 @@ sub tabdb if( %::GLOBAL_TAB_HASH && defined( $::GLOBAL_TAB_HASH{$table}) && defined( $::GLOBAL_TAB_HASH{$table}{$key}) ) { if( defined($::GLOBAL_TAB_HASH{$table}{$key}{$field}) ) { - return $::GLOBAL_TAB_HASH{$table}{$key}{$field}; + return "'".$::GLOBAL_TAB_HASH{$table}{$key}{$field}."'"; } else { my $msg; if( $field !~ /^(routenames)$/) { @@ -1141,7 +1141,7 @@ sub getAllAttribsFromSiteTab { if ($attribute eq "MASTER") { $masterset = 1; - $result .= "SITEMASTER=" . $value . "\n"; + $result .= "SITEMASTER='" . $value . "'\n"; $result .= "export SITEMASTER\n"; #if noderes.master for each node exists, the following value will be replaced. @@ -1168,9 +1168,9 @@ sub enablesshbetweennodes my $enablessh=xCAT::TableUtils->enablessh($node); if ($enablessh == 1) { - $result = "YES"; + $result = "'YES'"; } else { - $result = "NO"; + $result = "'NO'"; } return $result; @@ -1346,7 +1346,7 @@ sub getMonItems my %mon_conf = xCAT_monitoring::monitorctrl->getNodeConfData($node); foreach (keys(%mon_conf)) { - $result .= "$_=" . $mon_conf{$_} . "\n"; + $result .= "$_='" . $mon_conf{$_} . "'\n"; $result .= "export $_\n"; } @@ -1408,7 +1408,7 @@ sub getImageitems_for_node $ospkglist = $ref1->{'pkglist'}; if ($ref1->{'pkgdir'}) { - $result .= "OSPKGDIR=" . $ref1->{'pkgdir'} . "\n"; + $result .= "OSPKGDIR='" . $ref1->{'pkgdir'} . "'\n"; $result .= "export OSPKGDIR\n"; } }