From 65814f3b59a476874922889148084db2d9d72ebc Mon Sep 17 00:00:00 2001 From: zhaoertao Date: Thu, 13 Nov 2014 21:54:17 -0500 Subject: [PATCH] fix bug 4395: ubuntu didn't get pkgdir from the osimage pkdir attribute --- xCAT-server/lib/perl/xCAT/Template.pm | 3 +++ xCAT-server/lib/xcat/plugins/debian.pm | 2 +- xCAT-server/share/xcat/install/ubuntu/compute.tmpl | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/perl/xCAT/Template.pm b/xCAT-server/lib/perl/xCAT/Template.pm index 6852a0e27..fe202fe3a 100644 --- a/xCAT-server/lib/perl/xCAT/Template.pm +++ b/xCAT-server/lib/perl/xCAT/Template.pm @@ -231,6 +231,9 @@ sub subvars { $inc =~ s/#INSTALL_SOURCES#/$source/g; $inc =~ s/#INSTALL_SOURCES_IN_PRE#/$source_in_pre/g; + if (("ubuntu" eq $platform) || ("debian" eq $platform)) { + $inc =~ s/#INCLUDE_OSIMAGE_PKGDIR#/$pkgdirs[-1]/; + } } #ok, now do everything else.. diff --git a/xCAT-server/lib/xcat/plugins/debian.pm b/xCAT-server/lib/xcat/plugins/debian.pm index 5d9d59a90..27d0318b6 100755 --- a/xCAT-server/lib/xcat/plugins/debian.pm +++ b/xCAT-server/lib/xcat/plugins/debian.pm @@ -661,7 +661,7 @@ sub mkinstall "$installroot/autoinst/" . $node, $node, $pkglistfile, - "", + $pkgdir, $platform ); } diff --git a/xCAT-server/share/xcat/install/ubuntu/compute.tmpl b/xCAT-server/share/xcat/install/ubuntu/compute.tmpl index 16acab413..d3b3a79c8 100644 --- a/xCAT-server/share/xcat/install/ubuntu/compute.tmpl +++ b/xCAT-server/share/xcat/install/ubuntu/compute.tmpl @@ -18,7 +18,7 @@ d-i netcfg/dhcp_timeout string 120 d-i mirror/country string manual d-i mirror/protocol string http -d-i mirror/http/directory string /install/#TABLE:nodetype:$NODE:os#/#TABLE:nodetype:$NODE:arch# +d-i mirror/http/directory string #INCLUDE_OSIMAGE_PKGDIR# d-i mirror/http/proxy string # Suite to install.