From 5f0982007f91fbc1550521b7aca2acd58ad8c9a2 Mon Sep 17 00:00:00 2001 From: Jesse Andrews Date: Sun, 11 Sep 2011 16:34:34 -0700 Subject: [PATCH] move screenrc from stack.sh --- .gitignore | 1 + build.sh | 16 ++++++++++------ files/screenrc | 9 +++++++++ sources.list => files/sources.list | 0 stack.sh | 12 ------------ 5 files changed, 20 insertions(+), 18 deletions(-) create mode 100644 .gitignore create mode 100644 files/screenrc rename sources.list => files/sources.list (100%) diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000..2ff540d576 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +proto diff --git a/build.sh b/build.sh index f6d287de93..beb964cb8e 100755 --- a/build.sh +++ b/build.sh @@ -11,7 +11,7 @@ rm -rf $DEST # build a proto image - natty + packages that will install (optimization) if [ ! -d proto ]; then debootstrap natty proto - cp sources.list proto/etc/apt/sources.list + cp files/sources.list proto/etc/apt/sources.list chroot proto apt-get update chroot proto apt-get install -y `cat apts/* | cut -d\# -f1 | egrep -v "(rabbitmq|libvirt-bin)"` chroot proto pip install `cat pips/*` @@ -33,17 +33,21 @@ echo "127.0.0.1 localhost $NAME" > $DEST/etc/hosts # copy kernel modules cp -pr /lib/modules/`uname -r` $DEST/lib/modules +# helpful screenrc +cp files/screenrc $DEST/root/.screenrc + # copy openstack installer and requirement lists to a new directory. mkdir -p $DEST/opt cp stack.sh $DEST/opt/stack.sh cp -r pips $DEST/opt cp -r apts $DEST/opt -# injecting root's ssh key -# FIXME: only do this if id_rsa.pub exists -mkdir $DEST/root/.ssh -chmod 700 $DEST/root/.ssh -cp /root/.ssh/id_rsa.pub $DEST/root/.ssh/authorized_keys +# injecting root's public ssh key if it exists +if [ -f /root/.ssh/id_rsa.pub ]; then + mkdir $DEST/root/.ssh + chmod 700 $DEST/root/.ssh + cp /root/.ssh/id_rsa.pub $DEST/root/.ssh/authorized_keys +fi # set root password to password echo root:password | chroot $DEST chpasswd diff --git a/files/screenrc b/files/screenrc new file mode 100644 index 0000000000..1ca47da584 --- /dev/null +++ b/files/screenrc @@ -0,0 +1,9 @@ +hardstatus on +hardstatus alwayslastline +hardstatus string "%{.bW}%-w%{.rW}%n %t%{-}%+w %=%{..G}%H %{..Y}%d/%m %c" + +defscrollback 1024 + +vbell off +startup_message off + diff --git a/sources.list b/files/sources.list similarity index 100% rename from sources.list rename to files/sources.list diff --git a/stack.sh b/stack.sh index c278701ca8..c3d7bbf2e4 100755 --- a/stack.sh +++ b/stack.sh @@ -133,18 +133,6 @@ EOF exit fi -# Configure screen -cat >~/.screenrc <