fall back to using dpkg when arch is detected as x86_64 to make sure we're not really on an i386 image to prevent wrong s6 overlay version being downloaded on a 32 bit image

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
This commit is contained in:
Adam Warner
2024-06-15 16:55:02 +01:00
parent b799ee35f5
commit eda9fdcf8d

View File

@@ -17,8 +17,14 @@ detect_arch() {
S6_ARCH="armhf";; S6_ARCH="armhf";;
armv7l) armv7l)
S6_ARCH="armhf";; S6_ARCH="armhf";;
i386) x86_64)
S6_ARCH="i686";; # arch returns x86_64 on linux/i386, causing the wrong s6-overlay to be downloaded
# fallback to dpkg to check the architecture and download the i686 s6-overlay if necessary
# see https://github.com/pi-hole/docker-pi-hole/issues/1524 for more information
ARCH_CHECK=$(dpkg --print-architecture)
if [ "$ARCH_CHECK" == "i386" ]; then
S6_ARCH="i686"
fi
esac esac
} }