On Tue, Dec 22, 2020 at 05:20:30PM +0800, Wang Chenglong wrote:
[error] [WARNNING] Restoring the owner of qcow2 file Finding vmlinuz under /tmp/a/boot ...
/c/compass-ci/container/qcow2rootfs/bin/common: line 135: ROOTFS_VMLINUZ_FILE: unbound variable
[why] some kernels are called vmlinx instead of vmlinz.
container/qcow2rootfs/bin/common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/container/qcow2rootfs/bin/common b/container/qcow2rootfs/bin/common index da39f52..336602e 100755 --- a/container/qcow2rootfs/bin/common +++ b/container/qcow2rootfs/bin/common @@ -127,7 +127,7 @@ get_rootfs_kernel() { exit 5 } local vmlinuz_file vmlinuz kernel
- vmlinuz_file=$(find ./boot -name "vmlinuz-*" |grep -v rescue) && export ROOTFS_VMLINUZ_FILE=$vmlinuz_file
- vmlinuz_file=$(find ./boot -name "vmlinu[z|x]-*" |grep -v rescue) && export ROOTFS_VMLINUZ_FILE=$vmlinuz_file
^----add space. Thanks, Liushaofei
vmlinuz=$(basename "$vmlinuz_file") && export ROOTFS_VMLINUZ=$vmlinuz kernel=${vmlinuz:8} && export ROOTFS_KERNEL=$kernel
-- 2.23.0