Skip to content

Commit 0ea4f4d

Browse files
authored
Clear /etc/resolv.conf before building image (#12592)
Why I did it nameserver and domain entries from build system fsroot gets into sonic image. How I did it Clear /etc/resolv.conf before building image How to verify it Built image with it and verified with install that /etc/resolv.conf is empty
1 parent b45aaef commit 0ea4f4d

File tree

2 files changed

+1
-0
lines changed

2 files changed

+1
-0
lines changed

build_debian.sh

+1
Original file line numberDiff line numberDiff line change
@@ -679,6 +679,7 @@ sudo rm -f $ONIE_INSTALLER_PAYLOAD $FILESYSTEM_SQUASHFS
679679
## Note: -x to skip directories on different file systems, such as /proc
680680
sudo du -hsx $FILESYSTEM_ROOT
681681
sudo mkdir -p $FILESYSTEM_ROOT/var/lib/docker
682+
sudo cp files/image_config/resolv-config/resolv.conf $FILESYSTEM_ROOT/etc/resolv.conf
682683
sudo mksquashfs $FILESYSTEM_ROOT $FILESYSTEM_SQUASHFS -comp zstd -b 1M -e boot -e var/lib/docker -e $PLATFORM_DIR
683684

684685
# Ensure admin gid is 1000

files/image_config/resolv-config/resolv.conf

Whitespace-only changes.

0 commit comments

Comments
 (0)