zypper-minimal: Don't get confused by etc/resolv.conf symlink
Newer openSUSE distributions install an absolute link to /run/netconfig as /etc/resolv.conf in $TARGET_ROOT. as that points outside TARGET_ROOT, we unintentionally wipe the system resolv.conf here and break our ability to finish building the image. Change-Id: I9d5aaa9fad2f81dcabfe19e2f1e6b6e50af597d7
This commit is contained in:
parent
c596fb7dbd
commit
6c23b97f4a
1 changed files with 5 additions and 0 deletions
|
@ -101,6 +101,11 @@ sudo zypper ${ZYPPER_TARGET_OPTS} install \
|
|||
${DIB_OPENSUSE_PATTERNS} ${ZYPPER_INSTALL_SYSTEM_PYTHON} \
|
||||
zypper sudo ca-certificates-mozilla
|
||||
|
||||
# Remove the installed symlink, otherwise we wipe the resolv.conf
|
||||
# outside the target_root (as the link is not relative)
|
||||
# outside target_root
|
||||
test -L $TARGET_ROOT/etc/resolv.conf && sudo rm -f $TARGET_ROOT/etc/resolv.conf
|
||||
|
||||
# Put in a dummy /etc/resolv.conf over the temporary one we used
|
||||
# to bootstrap. systemd has a bug/feature [1] that it will assume
|
||||
# you want systemd-networkd as the network manager and create a
|
||||
|
|
Loading…
Reference in a new issue