initrd_os_dir is used twice here, define a var fo it.
Signed-off-by: Xu Xijian xuxijian@huawei.com --- src/lib/job.cr | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/lib/job.cr b/src/lib/job.cr index 32aa662..fc712ba 100644 --- a/src/lib/job.cr +++ b/src/lib/job.cr @@ -299,10 +299,11 @@ class Job private def initramfs_initrds temp_initrds = [] of String
+ initrd_os_dir = "#{SRV_INITRD}/osimage/#{os_dir}" temp_initrds << "#{INITRD_HTTP_PREFIX}" + - "#{JobHelper.service_path("#{SRV_INITRD}/osimage/#{os_dir}/current")}" + "#{JobHelper.service_path("#{initrd_os_dir}/current")}" temp_initrds << "#{INITRD_HTTP_PREFIX}" + - "#{JobHelper.service_path("#{SRV_INITRD}/osimage/#{os_dir}/run-ipconfig.cgz")}" + "#{JobHelper.service_path("#{initrd_os_dir}/run-ipconfig.cgz")}"
temp_initrds.concat(initrd_deps.split(/ /)) unless initrd_deps.empty? temp_initrds.concat(initrd_pkg.split(/ /)) unless initrd_pkg.empty?