Browse Source

Merge "zypper-minimal: Don't get confused by etc/resolv.conf symlink"

tags/2.26.1^0
Zuul 4 weeks ago
parent
commit
76b09c845c
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      diskimage_builder/elements/zypper-minimal/root.d/08-zypper-chroot

+ 5
- 0
diskimage_builder/elements/zypper-minimal/root.d/08-zypper-chroot View File

@@ -101,6 +101,11 @@ sudo zypper ${ZYPPER_TARGET_OPTS} install \
101 101
     ${DIB_OPENSUSE_PATTERNS} ${ZYPPER_INSTALL_SYSTEM_PYTHON} \
102 102
     zypper sudo ca-certificates-mozilla
103 103
 
104
+# Remove the installed symlink, otherwise we wipe the resolv.conf
105
+# outside the target_root (as the link is not relative)
106
+# outside target_root
107
+test -L $TARGET_ROOT/etc/resolv.conf && sudo rm -f $TARGET_ROOT/etc/resolv.conf
108
+
104 109
 # Put in a dummy /etc/resolv.conf over the temporary one we used
105 110
 # to bootstrap.  systemd has a bug/feature [1] that it will assume
106 111
 # you want systemd-networkd as the network manager and create a

Loading…
Cancel
Save