On Thu, Oct 29, 2020 at 10:23:44AM +0800, Liu Yinsi wrote:
private def set_kernel_uri
- vmlinuz_sub_path = (("#{kernel_version}" == "default") ? "vmlinuz" : "boot/vmlinuz-#{kernel_version}")
we not use soft link?
Thanks, Yinsi
Because there are several kernel versions to choose, if all of them use soft link, there will be several soft links, it's redundant. For example, 100 kernel versions will need 100 soft links. So I just keep the default kernel version as a soft link.
Thanks, Xijian
self["kernel_uri"] = "kernel #{OS_HTTP_PREFIX}" +
"#{JobHelper.service_path("#{SRV_OS}/#{os_dir}/vmlinuz")}"
"#{JobHelper.service_path("#{SRV_OS}/#{os_dir}/#{vmlinuz_sub_path}")}"
end
private def kernel_common_params
@@ -315,10 +317,16 @@ class Job temp_initrds = [] of String
osimage_dir = "#{SRV_INITRD}/osimage/#{os_dir}"
boot_dir = "#{SRV_OS}/#{os_dir}/boot"
self["kernel_version"] ||= "default" temp_initrds << "#{INITRD_HTTP_PREFIX}" + "#{JobHelper.service_path("#{osimage_dir}/current")}" temp_initrds << "#{INITRD_HTTP_PREFIX}" + "#{JobHelper.service_path("#{osimage_dir}/run-ipconfig.cgz")}"
temp_initrds << "#{OS_HTTP_PREFIX}" +
"#{JobHelper.service_path("#{boot_dir}/modules-#{kernel_version}.cgz")}"
temp_initrds << "#{OS_HTTP_PREFIX}" +
"#{JobHelper.service_path("#{boot_dir}/headers-#{kernel_version}.cgz")}"
temp_initrds.concat(initrd_deps.split(/ /)) unless initrd_deps.empty? temp_initrds.concat(initrd_pkg.split(/ /)) unless initrd_pkg.empty?
-- 2.23.0