From 9d689029318f1ced0dd2228e593025d090f34262 Mon Sep 17 00:00:00 2001 From: lissav Date: Tue, 3 Jan 2012 19:45:17 +0000 Subject: [PATCH] change check to handle regx in postscripts list git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11325 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/sbin/xcatconfig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xCAT-server/sbin/xcatconfig b/xCAT-server/sbin/xcatconfig index bcb55880a..faca4c407 100755 --- a/xCAT-server/sbin/xcatconfig +++ b/xCAT-server/sbin/xcatconfig @@ -1809,11 +1809,11 @@ sub cleanupPSTable my $pslist=$entry->{'postscripts'}; if ($pslist) { my $servicenode=0; - my $newpslist ="\""; + my $newpslist ="\'"; my @ps= split(",", $pslist); # now check is servicenode and xcatclient and/or xcatserver in the list foreach my $pscript (@ps) { - if ($pscript =~ /^servicenode/i) { # found servicenode ps + if ($pscript =~ /(^|\|)servicenode($|\|)/i) { # found servicenode ps $newpslist .=$pscript; $newpslist .=","; $servicenode=1; @@ -1822,7 +1822,7 @@ sub cleanupPSTable $newpslist .=$pscript; $newpslist .=","; } else { # servicenode found, do not keep xcatserver/xcatclient - if (($pscript =~ /^xcatserver/i) ||($pscript =~ /^xcatclient/i)) { + if (($pscript =~ /(^|\|)xcatserver($|\|)/i) ||($pscript =~ /(^|\|)xcatclient($|\|)/i)) { next; } else { $newpslist .=$pscript; @@ -1832,7 +1832,7 @@ sub cleanupPSTable } } chop $newpslist; - $newpslist .="\""; + $newpslist .="\'"; my $chtabcmds .= "$::XCATROOT/sbin/chtab node=$node postscripts.postscripts=$newpslist;"; my $outref = xCAT::Utils->runcmd("$chtabcmds", 0);