Skip to content

Commit

Permalink
[dns] Update /etc/resolv.conf during a service restart
Browse files Browse the repository at this point in the history
  • Loading branch information
oleksandrivantsiv committed May 30, 2023
1 parent 175dadf commit 98a1fff
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions files/image_config/resolv-config/resolv-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,15 @@ CONFIG_DIR=${WD}/interface/
STATIC_CONFIG_FILE=mgmt.static
DYNAMIC_CONFIG_FILE_TEMPLATE=*.dhclient

update_symlink()
{
ln -sf /run/resolvconf/resolv.conf /etc/resolv.conf
}

start()
{
update_symlink

redis-dump -d 4 -k "DNS_NAMESERVER*" -y > /tmp/dns.json
if [[ $? -eq 0 && "$(cat /tmp/dns.json)" != "{}" ]]; then
# Apply static DNS configuration and disable updates
Expand Down

0 comments on commit 98a1fff

Please sign in to comment.