From 1d3d316d057cd7cfcd88a6f7b8c9dc745aa6d233 Mon Sep 17 00:00:00 2001 From: jjhua Date: Tue, 13 Aug 2013 17:13:47 -0400 Subject: [PATCH] fixed bug 3718. This fix only checked into xCAT 2.9 --- xCAT-server/lib/perl/xCAT/Postage.pm | 6 +++--- .../share/xcat}/mypostscript/mypostscript.tmpl | 0 xCAT-server/xCAT-server.spec | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) rename {xCAT/templates => xCAT-server/share/xcat}/mypostscript/mypostscript.tmpl (100%) diff --git a/xCAT-server/lib/perl/xCAT/Postage.pm b/xCAT-server/lib/perl/xCAT/Postage.pm index 0e43a698f..a3456a1b6 100644 --- a/xCAT-server/lib/perl/xCAT/Postage.pm +++ b/xCAT-server/lib/perl/xCAT/Postage.pm @@ -186,15 +186,15 @@ sub makescript { if($entries[0]) { $installroot = $entries[0]; } - my $tmpl="$installroot/postscripts/mypostscript.tmpl"; + my $tmpl="$installroot/postscripts/mypostscript.tmpl"; #the customized mypostscript template unless ( -r $tmpl) { - $tmpl="$::XCATROOT/share/xcat/templates/mypostscript/mypostscript.tmpl"; + $tmpl="$::XCATROOT/share/xcat/mypostscript/mypostscript.tmpl"; #the default xcat mypostscript template } unless ( -r "$tmpl") { my $rsp; - $rsp->{data}->[0]= "No mypostscript template exists in directory /install/postscripts or $::XCATROOT/share/xcat/templates/mypostscript/mypostscript.tmpl.\n"; + $rsp->{data}->[0]= "No mypostscript template exists in directory /install/postscripts or $::XCATROOT/share/xcat/mypostscript/mypostscript.tmpl.\n"; xCAT::MsgUtils->message("SE", $rsp, $callback,1); return ; } diff --git a/xCAT/templates/mypostscript/mypostscript.tmpl b/xCAT-server/share/xcat/mypostscript/mypostscript.tmpl similarity index 100% rename from xCAT/templates/mypostscript/mypostscript.tmpl rename to xCAT-server/share/xcat/mypostscript/mypostscript.tmpl diff --git a/xCAT-server/xCAT-server.spec b/xCAT-server/xCAT-server.spec index 83264f71a..75e7e4e9f 100644 --- a/xCAT-server/xCAT-server.spec +++ b/xCAT-server/xCAT-server.spec @@ -72,6 +72,7 @@ mkdir -p $RPM_BUILD_ROOT/%{prefix}/bin mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/install mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/netboot mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/ca +mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/mypostscript mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/scripts mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/samples mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/tools @@ -118,6 +119,7 @@ chmod -h 755 $RPM_BUILD_ROOT/%{prefix}/bin/* cp share/xcat/ca/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/ca chmod 644 $RPM_BUILD_ROOT/%{prefix}/share/xcat/ca/* +cp share/xcat/mypostscript/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/mypostscript cp share/xcat/scripts/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/scripts cp share/xcat/samples/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/samples cp -r share/xcat/tools/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/tools