
About subject: iso2rootfs: add some configurtion of rootfs Thanks, Shenwei On Fri, Nov 13, 2020 at 02:57:15PM +0800, Yu Chuan wrote:
[Why] The initial rootfs have the follow two problems: - no dns resolver; - selinux is opened;
Signed-off-by: Yu Chuan <13186087857@163.com> --- tests/iso2rootfs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+)
diff --git a/tests/iso2rootfs b/tests/iso2rootfs index 2e7bcd47ef4f..87a51acaca5f 100755 --- a/tests/iso2rootfs +++ b/tests/iso2rootfs @@ -338,6 +338,27 @@ run_qcow2rootfs() ./run "${qcow2_path}" "${ROOTFS_DES_DIR}" }
+ +############ config rootfs ############ +config_dns_resolver() +{ + cat <<-EOF > "${ROOTFS_DES_DIR}/etc/resolv.conf" + nameserver 114.114.114.114 + nameserver 8.8.8.8 + EOF +} + +disable_selinux() +{ + sed -i 's/^SELINUX=.*/SELINUX=disabled/g' "${ROOTFS_DES_DIR}/etc/selinux/config" +} + +config_rootfs() +{ + config_dns_resolver + disable_selinux +} + ############ test rootfs ############ get_qemu_efi_fd() { @@ -497,6 +518,8 @@ main() config_qcow2rootfs run_qcow2rootfs
+ config_rootfs + test_rootfs [ -z ${test_yaml} ] || submit_test_job_yaml
-- 2.23.0