Skip to content

Commit cc6967a

Browse files
committed
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 <[email protected]>
1 parent b799ee3 commit cc6967a

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/s6/debian-root/usr/local/bin/install.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,14 @@ detect_arch() {
1717
S6_ARCH="armhf";;
1818
armv7l)
1919
S6_ARCH="armhf";;
20-
i386)
21-
S6_ARCH="i686";;
22-
esac
20+
x86_64)
21+
# arch returns x86_64 on linux/i386, causing the wrong s6-overlay to be downloaded
22+
# fallback to dpkg to check the architecture and download the i686 s6-overlay if necessary
23+
ARCH_CHECK=$(dpkg --print-architecture)
24+
if [ "$ARCH_CHECK" == "i386" ]; then
25+
S6_ARCH="i686"
26+
fi
27+
esac
2328
}
2429

2530

0 commit comments

Comments
 (0)