From: Sage Weil Date: Mon, 7 Feb 2011 18:07:51 +0000 (-0800) Subject: build_debian_image: fixes X-Git-Tag: v0.25~199 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=56e4aa46353c759d586b96df181963604a38218d;p=ceph.git build_debian_image: fixes - /dev/pts - copy console helper scripts - run from any directory Signed-off-by: Sage Weil --- diff --git a/src/script/build_debian_image.sh b/src/script/build_debian_image.sh index 154cea1fb882..eef0508f92e0 100755 --- a/src/script/build_debian_image.sh +++ b/src/script/build_debian_image.sh @@ -6,6 +6,8 @@ image="$1" root=/tmp/$$ dist=squeeze +srcdir=`dirname $0` + # image [ -e $image ] && echo $image exists && exit 1 dd if=/dev/zero of=$image bs=1M seek=1023 count=1 @@ -17,6 +19,7 @@ mount -o loop $image $root cleanup() { umount $root/proc || true umount $root/sys || true + umount $root/dev/pts || true umount $root } trap cleanup INT TERM EXIT @@ -38,11 +41,16 @@ mkdir $root/host # set up chroot mount -t proc proc $root/proc mount -t sysfs sysfs $root/sys +mount -t devpts devptr $root/dev/pts -o gid=5,mode=620 # set up network -cp network-from-cmdline $root/etc/init.d/network-from-cmdline +cp $srcdir/network-from-cmdline $root/etc/init.d/network-from-cmdline chroot $root update-rc.d network-from-cmdline defaults 20 +# kcon_ helpers +cp $srcdir/kcon_most.sh $root/root/most.sh +cp $srcdir/kcon_all.sh $root/root/all.sh + # fix up consoles cat <> $root/etc/securetty @@ -69,9 +77,6 @@ cp ~/.ssh/authorized_keys $root/root/.ssh/authorized_keys chmod 600 $root/root/.ssh/authorized_keys # packages -for p in ssh libcrypto++ -do - chroot $root apt-get -y --force-yes install $p -done +chroot $root apt-get -y --force-yes install ssh libcrypto++ exit 0