Fix resolvconf installation in chroot in some cases

This commit is contained in:
zador-blood-stained 2018-06-05 18:53:45 +03:00
parent 55bb4139e7
commit 0b89533bf1
2 changed files with 8 additions and 0 deletions

View file

@ -180,6 +180,9 @@ create_rootfs_cache()
# add armhf arhitecture to arm64
[[ $ARCH == arm64 ]] && eval 'LC_ALL=C LANG=C chroot $SDCARD /bin/bash -c "dpkg --add-architecture armhf"'
# this should fix resolvconf installation failure in some cases
chroot $SDCARD /bin/bash -c 'echo "resolvconf resolvconf/linkify-resolvconf boolean false" | debconf-set-selections'
# stage: update packages list
display_alert "Updating package list" "$RELEASE" "info"
eval 'LC_ALL=C LANG=C chroot $SDCARD /bin/bash -c "apt-get -q -y $apt_extra update"' \

View file

@ -295,6 +295,11 @@ post_debootstrap_tweaks()
rm -f $SDCARD/sbin/initctl $SDCARD/sbin/start-stop-daemon
chroot $SDCARD /bin/bash -c "dpkg-divert --quiet --local --rename --remove /sbin/initctl"
chroot $SDCARD /bin/bash -c "dpkg-divert --quiet --local --rename --remove /sbin/start-stop-daemon"
chroot $SDCARD /bin/bash -c 'echo "resolvconf resolvconf/linkify-resolvconf boolean true" | debconf-set-selections'
mkdir -p $SDCARD/var/lib/resolvconf/linkified
:> $SDCARD/var/lib/resolvconf/linkified
rm -f $SDCARD/usr/sbin/policy-rc.d $SDCARD/usr/bin/$QEMU_BINARY
# reenable resolvconf managed resolv.conf