diff --git a/xCAT-server/lib/perl/xCAT/Template.pm b/xCAT-server/lib/perl/xCAT/Template.pm
index 0e36cc8b8..5981f1050 100644
--- a/xCAT-server/lib/perl/xCAT/Template.pm
+++ b/xCAT-server/lib/perl/xCAT/Template.pm
@@ -197,6 +197,7 @@ sub subvars {
false
SuSE-Linux-pkg$c
";
+ $source_in_pre .="http://'\$nextserver'$pkgdirSuSE-Linux-pkg$c/falseSuSE-Linux-pkg$c";
}
$c++;
}
diff --git a/xCAT-server/share/xcat/install/scripts/pre.sles b/xCAT-server/share/xcat/install/scripts/pre.sles
index 51579f8a8..055fcd393 100644
--- a/xCAT-server/share/xcat/install/scripts/pre.sles
+++ b/xCAT-server/share/xcat/install/scripts/pre.sles
@@ -170,6 +170,10 @@ if [ -r "/tmp/partitionfile" ]; then
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
+
+export nextserver=`cat /proc/cmdline | grep http | head -n 1 | cut -d / -f 3 | cut -d : -f 1`
+cp /tmp/profile/modified.xml /tmp/profile/modified1.xml
+sed -e 's!!#INSTALL_SOURCES_IN_PRE#!' /tmp/profile/modified1.xml > /tmp/profile/modified.xml
]]>
diff --git a/xCAT-server/share/xcat/install/sles/compute.sles11.tmpl b/xCAT-server/share/xcat/install/sles/compute.sles11.tmpl
index 684e1a514..64819cafa 100644
--- a/xCAT-server/share/xcat/install/sles/compute.sles11.tmpl
+++ b/xCAT-server/share/xcat/install/sles/compute.sles11.tmpl
@@ -35,11 +35,6 @@
-
-
- #INSTALL_SOURCES#
-
-
diff --git a/xCAT-server/share/xcat/install/sles/compute.tmpl b/xCAT-server/share/xcat/install/sles/compute.tmpl
index c2644cbac..53e0e7df4 100644
--- a/xCAT-server/share/xcat/install/sles/compute.tmpl
+++ b/xCAT-server/share/xcat/install/sles/compute.tmpl
@@ -34,12 +34,6 @@
true
-
-
- #INSTALL_SOURCES#
-
-
-
diff --git a/xCAT-server/share/xcat/install/sles/service.sles11.tmpl b/xCAT-server/share/xcat/install/sles/service.sles11.tmpl
index fdcaffa8d..21df8ef8f 100644
--- a/xCAT-server/share/xcat/install/sles/service.sles11.tmpl
+++ b/xCAT-server/share/xcat/install/sles/service.sles11.tmpl
@@ -35,11 +35,6 @@
-
-
- #INSTALL_SOURCES#
-
-