From d1effdcabb61616ba878af78b67837ad423a0f1a Mon Sep 17 00:00:00 2001 From: xq2005 Date: Thu, 12 Jul 2012 10:27:21 +0000 Subject: [PATCH] specify partition definition: support script for sles git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13286 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/share/xcat/install/scripts/pre.sles | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/xCAT-server/share/xcat/install/scripts/pre.sles b/xCAT-server/share/xcat/install/scripts/pre.sles index eb1e6ecd1..51579f8a8 100644 --- a/xCAT-server/share/xcat/install/scripts/pre.sles +++ b/xCAT-server/share/xcat/install/scripts/pre.sles @@ -158,8 +158,18 @@ if [ -d /sys/firmware/efi ]; then else sed -e 's!XCATPARTITIONHOOK!'$instdisk'!' /tmp/profile/autoinst.xml > /tmp/profile/modified.xml fi - #XCA_PARTITION_SCRIPT# +#add the following part for replace the partition definition in /tmp/profile/autoinst.xml +if [ -r "/tmp/partitionfile" ]; then + while read line + do + con="${con}${line}" + done < /tmp/partitionfile + con=${con//>\s+<} + con=${con// /xcattempspace} + sed -e '//{N;N;s!.*!'$con'!}' /tmp/profile/autoinst.xml > /tmp/profile/modified1.xml + sed -e 's!xcattempspace! !g' /tmp/profile/modified1.xml > /tmp/profile/modified.xml +fi ]]>