summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Loibl <andreas@andreas-loibl.de>2011-09-28 00:52:46 +0200
committerAndreas Loibl <andreas@andreas-loibl.de>2011-09-28 00:52:46 +0200
commit3949b1c825e5262d0d3eb3b6ddd76f0449f684e0 (patch)
treec2ae30a3c25ddabe2177c5ca4e520027d3869bf6
parentd7ceda3b39e650db3f98de7da96b5ea40d0ff035 (diff)
downloadkanotix-3949b1c825e5262d0d3eb3b6ddd76f0449f684e0.zip
kanotix-3949b1c825e5262d0d3eb3b6ddd76f0449f684e0.tar.gz
using linux32 for 32bit chroot in 64bit host
-rwxr-xr-xbuild_gfxoverlay.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/build_gfxoverlay.sh b/build_gfxoverlay.sh
index ef332b7..b9b0d78 100755
--- a/build_gfxoverlay.sh
+++ b/build_gfxoverlay.sh
@@ -68,7 +68,12 @@ eof
cat usr/local/bin/install-$drv-debian.sh >> overlay.sh
sed -i '/exit 3/d' overlay.sh
chmod +x overlay.sh
-chroot . /overlay.sh -v $ver -z
+if [ "$(uname -m)" = "x86_64" ] && ! file bin/true | grep -q 'ELF 64-bit'; then
+ echo "Found 32bit chroot, using linux32..."
+ chroot . linux32 /overlay.sh -v $ver -z
+else
+ chroot . /overlay.sh -v $ver -z
+fi
cd ..
umount root/proc root/sys root/dev root &>/dev/null
rm -rf root