Actually the vmlinuz file in SRV_INITRD is copy from SRV_OS, so they are the same file, just use the same path is enough.
Signed-off-by: Xu Xijian xuxijian@huawei.com --- src/lib/job.cr | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/src/lib/job.cr b/src/lib/job.cr index 1e44d15..fc15441 100644 --- a/src/lib/job.cr +++ b/src/lib/job.cr @@ -272,18 +272,9 @@ class Job return true end
- private def vmlinuz - if os_mount == "initramfs" - return "#{INITRD_HTTP_PREFIX}" + - "#{JobHelper.service_path("#{SRV_INITRD}/osimage/#{os_dir}/vmlinuz")}" - else - return "#{OS_HTTP_PREFIX}" + - "#{JobHelper.service_path("#{SRV_OS}/#{os_dir}/vmlinuz")}" - end - end - private def set_kernel_uri - self["kernel_uri"] = "kernel #{vmlinuz()}" + self["kernel_uri"] = "kernel #{OS_HTTP_PREFIX}" + + "#{JobHelper.service_path("#{SRV_OS}/#{os_dir}/vmlinuz")}" end
private def kernel_common_params