{ echo "${config_rootfs}" | grep -qw 'dns' || return 0
- grep "^dns=none" $config_file || sed -i '/^[main]/adns=none' "${ROOTFS_DES_DIR}/etc/NetworkManager/NetworkManager.conf"
keep silence for grep, and too long line.
=> grep -s "^dns=none" $config_file || { sed -i '/^[main]/adns=none' "${ROOTFS_DES_DIR}/etc/NetworkManager/NetworkManager.conf" }
Thanks Luan Shengde
- cat <<-EOF > "${ROOTFS_DES_DIR}/etc/resolv.conf" nameserver 114.114.114.114 nameserver 8.8.8.8
-- 2.23.0