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?
On Fri, Oct 16, 2020 at 10:49:09AM +0800, Xu Xijian wrote:
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}"
i think should name it osimage_dir not initrd_os_dir
Thanks, Shenwei
temp_initrds << "#{INITRD_HTTP_PREFIX}" +
"#{JobHelper.service_path("#{SRV_INITRD}/osimage/#{os_dir}/current")}"
temp_initrds << "#{INITRD_HTTP_PREFIX}" +"#{JobHelper.service_path("#{initrd_os_dir}/current")}"
"#{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?
-- 2.23.0
On Fri, Oct 16, 2020 at 11:21:00AM +0800, Xiao Shenwei wrote:
On Fri, Oct 16, 2020 at 10:49:09AM +0800, Xu Xijian wrote:
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}"
i think should name it osimage_dir not initrd_os_dir
Thanks, Shenwei
good!
Thanks, Xijian