From 89c664d34d16422fcfdbf2ea0838b8a0a41b8b84 Mon Sep 17 00:00:00 2001 From: Andres Salomon Date: Tue, 19 Aug 2008 18:26:43 -0400 Subject: [PATCH] initchroot: ensure /etc/hosts, /etc/hostname, and /ofw are created Signed-off-by: Andres Salomon --- initchroot.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/initchroot.sh b/initchroot.sh index 3f67d5f..6140cae 100755 --- a/initchroot.sh +++ b/initchroot.sh @@ -47,6 +47,7 @@ check_for_cmds debootstrap || exit 1 debootstrap --arch i386 lenny ${ROOT_DIR} http://http.us.debian.org/debian mount -t proc proc ${ROOT_DIR}/proc mount -t devpts devpts ${ROOT_DIR}/dev/pts +mkdir ${ROOT_DIR}/ofw # allow daemons to be installed without breaking mv ${ROOT_DIR}/sbin/start-stop-daemon ${ROOT_DIR}/sbin/start-stop-daemon.REAL @@ -73,11 +74,26 @@ EOF # set up base system echo "en_US.UTF-8 UTF-8" >${ROOT_DIR}/etc/locale.gen (chroot ${ROOT_DIR} aptitude install -y locales) + k=$(wget -O- http://queued.mit.edu/~dilinger/builds-master/ | sed -ne 's/.*href="\(.\+\)_i386.deb".*/\1_i386.deb/p' | tail -n1) wget -O ${ROOT_DIR}/${k} http://queued.mit.edu/~dilinger/builds-master/${k} (chroot ${ROOT_DIR} dpkg -i /${k}) rm -f ${ROOT_DIR}/${k} +echo "debxo" > ${ROOT_DIR}/etc/hostname +cat >${ROOT_DIR}/etc/hosts<