
2 Nov
2020
2 Nov
'20
3:38 p.m.
On Sat, Oct 31, 2020 at 07:59:58PM +0800, Wu Fengguang wrote:
+ private def set_kernel_version + boot_dir = "#{SRV_OS}/#{os_dir}/boot" + if self["kernel_version"]? + self["vmlinuz_path"] = "#{boot_dir}/vmlinuz-#{kernel_version}" + self["modules_path"] = "#{boot_dir}/modules-#{kernel_version}.cgz" + self["headers_path"] = "#{boot_dir}/headers-#{kernel_version}.cgz"
The if/else 'self[] = ...' blocks can be consolidated with help of
suffix = '-' + kernel_version
+ else + self["vmlinuz_path"] = "#{boot_dir}/vmlinuz" + self["modules_path"] = "#{boot_dir}/modules.cgz" + self["headers_path"] = "#{boot_dir}/headers.cgz"
Those could be symlinks, better expand them to real path.
Thanks, Fengguang
Good Thanks, Xijian