[PATCH lkp-tests] lib/bootstrap.sh: add step: setup dns

7 Feb
2021
7 Feb
'21
10:25 a.m.
[Why] Since we have added a dns server, so we need to add support for dns function in lkp-tests framework. Signed-off-by: Yu Chuan <13186087857@163.com> --- lib/bootstrap.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/bootstrap.sh b/lib/bootstrap.sh index 1127de140a2b..06aa09bf65b2 100755 --- a/lib/bootstrap.sh +++ b/lib/bootstrap.sh @@ -283,6 +283,13 @@ setup_hosts() ln -fs $tmpfs_hosts /etc/hosts } +setup_dns() +{ + [ -n "$DNS_HOST" ] || return 0 + + echo "nameserver ${DNS_HOST}" > /etc/resolv.conf +} + export_ip_mac() { if has_cmd ip; then @@ -739,6 +746,7 @@ boot_init() setup_hostname setup_hosts + setup_dns add_lkp_user -- 2.23.0
1480
Age (days ago)
1480
Last active (days ago)
0 comments
1 participants
participants (1)
-
Yu Chuan