Skip to content

Commit

Permalink
Revert "Clear DNS configuration received from DHCP during networking …
Browse files Browse the repository at this point in the history
…reconfiguration in Linux. (sonic-net#13516)" (sonic-net#14902)

This reverts commit c7ecd92.
  • Loading branch information
yxieca authored May 2, 2023
1 parent 865605e commit 72c52bc
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 11 deletions.
7 changes: 1 addition & 6 deletions build_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,6 @@ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y in
jq \
auditd \
linux-perf \
resolvconf \
lsof \
sysstat

Expand Down Expand Up @@ -759,11 +758,7 @@ sudo rm -f $ONIE_INSTALLER_PAYLOAD $FILESYSTEM_SQUASHFS
## Note: -x to skip directories on different file systems, such as /proc
sudo du -hsx $FILESYSTEM_ROOT
sudo mkdir -p $FILESYSTEM_ROOT/var/lib/docker

## Clear DNS configuration inherited from the build server
sudo rm -f $FILESYSTEM_ROOT/etc/resolvconf/resolv.conf.d/original
sudo cp files/image_config/resolv-config/resolv.conf.head $FILESYSTEM_ROOT/etc/resolvconf/resolv.conf.d/head

sudo cp files/image_config/resolv-config/resolv.conf $FILESYSTEM_ROOT/etc/resolv.conf
sudo mksquashfs $FILESYSTEM_ROOT $FILESYSTEM_SQUASHFS -comp zstd -b 1M -e boot -e var/lib/docker -e $PLATFORM_DIR

# Ensure admin gid is 1000
Expand Down
3 changes: 0 additions & 3 deletions files/image_config/interfaces/interfaces-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,6 @@ for intf_pid in $(ls -1 /var/run/dhclient*.Ethernet*.pid 2> /dev/null); do
[[ -f ${intf_pid} ]] && kill `cat ${intf_pid}` && rm -f ${intf_pid}
done

[[ -f /var/run/resolvconf/interface/eth0.dhclient ]] && rm -f /var/run/resolvconf/interface/eth0.dhclient
[[ -f /var/run/resolvconf/interface/eth0.ip6.dhclient ]] && rm -f /var/run/resolvconf/interface/eth0.ip6.dhclient

# Read sysctl conf files again
sysctl -p /etc/sysctl.d/90-dhcp6-systcl.conf

Expand Down
Empty file.
2 changes: 0 additions & 2 deletions files/image_config/resolv-config/resolv.conf.head

This file was deleted.

0 comments on commit 72c52bc

Please sign in to comment.