From d4715d27452e29bb3f4de240aa43409f7c3dbdce Mon Sep 17 00:00:00 2001 From: GONG Jie Date: Thu, 21 Mar 2019 16:02:03 +0800 Subject: [PATCH 1/2] Fix #UNCOMMENTOENABLEDEBUGPORT# replacement --- xCAT-server/lib/perl/xCAT/Template.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-server/lib/perl/xCAT/Template.pm b/xCAT-server/lib/perl/xCAT/Template.pm index 801581446..0da104fa0 100644 --- a/xCAT-server/lib/perl/xCAT/Template.pm +++ b/xCAT-server/lib/perl/xCAT/Template.pm @@ -394,7 +394,7 @@ sub subvars { $inc =~ s/#COLONHTTPPORT#/$httpportsuffix/eg; if (($::XCATSITEVALS{xcatdebugmode} eq "1") or ($::XCATSITEVALS{xcatdebugmode} eq "2")) { - $inc =~ s/#UNCOMMENTOENABLEDEBUGPORT#/ /g; + $inc =~ s/#UNCOMMENTOENABLEDEBUGPORT#//g; } if ($::XCATSITEVALS{xcatdebugmode} eq "2") { From 58441c848961ecd745325254d9e280e87c599ad6 Mon Sep 17 00:00:00 2001 From: GONG Jie Date: Thu, 21 Mar 2019 16:03:12 +0800 Subject: [PATCH 2/2] Make variable output byte instead of string --- xCAT-server/share/xcat/install/scripts/pre.rhels8 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xCAT-server/share/xcat/install/scripts/pre.rhels8 b/xCAT-server/share/xcat/install/scripts/pre.rhels8 index 4563e2632..66abd34db 100644 --- a/xCAT-server/share/xcat/install/scripts/pre.rhels8 +++ b/xCAT-server/share/xcat/install/scripts/pre.rhels8 @@ -116,8 +116,8 @@ try: #UNCOMMENTOENABLEDEBUGPORT# newcommand = b"" #UNCOMMENTOENABLEDEBUGPORT# for i in command[1:]: #UNCOMMENTOENABLEDEBUGPORT# newcommand = newcommand + i + b" " -#UNCOMMENTOENABLEDEBUGPORT# output = os.popen(newcommand.decode('utf-8')).read() -#UNCOMMENTOENABLEDEBUGPORT# newSocket.send(output.encode()) +#UNCOMMENTOENABLEDEBUGPORT# output = os.popen(newcommand.decode('utf-8')).read().encode() +#UNCOMMENTOENABLEDEBUGPORT# newSocket.send(output) #UNCOMMENTOENABLEDEBUGPORT# break if(command[0] == b"screendump"): newcommand = "cat /dev/vcs"