diff options
author | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2012-01-13 15:17:54 +0000 |
---|---|---|
committer | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2012-01-13 15:17:54 +0000 |
commit | 659d035e3f64c16deb53e95e3a308c37cc9f1479 (patch) | |
tree | 2e901a70fb1df03d98b11c6ea5115c4bdb988a63 | |
parent | fb7ea35ca0ff4c75e80f7a79889a2cc6d83936aa (diff) | |
download | morph-659d035e3f64c16deb53e95e3a308c37cc9f1479.tar.gz |
add script to run baserock-bootstrap in a newly created clean chroot
-rwxr-xr-x | run-bootstrap-in-chroot | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/run-bootstrap-in-chroot b/run-bootstrap-in-chroot new file mode 100755 index 00000000..1671b4c0 --- /dev/null +++ b/run-bootstrap-in-chroot @@ -0,0 +1,37 @@ +#!/bin/sh + +set -e + +export LC_ALL=C + +dir="squeeze-chroot" +mirror="http://192.168.1.185/debian" + +mkdir "$dir" + +debootstrap \ +--include=build-essential,\ +bc,gawk,bison,python,autoconf,autopoint,automake,gettext,libtool,\ +help2man,texinfo,sudo \ +squeeze "$dir" "$mirror" + +hostname > "$dir/etc/hostname" +cat <<EOF > "$dir/etc/hosts" +127.0.0.1 localhost +127.0.1.1 $(hostname) +EOF + +cp baserock-bootstrap "$dir/." +sed 's,^.*/,http://192.168.1.185/lfs/,' wget-list > "$dir/wget-list" +cp -a /home/liw/baserock/lfs-tarballs "$dir/." +mount -t proc proc "$dir/proc" +mount -t sysfs sysfs "$dir/sys" +if chroot "$dir" bash -x baserock-bootstrap yes +then + exit=0 +else + exit=$? +fi +umount "$dir/sys" +umount "$dir/proc" +exit $exit |