Skip to content

Commit 5f09820

Browse files
committed
move screenrc from stack.sh
1 parent f2ef760 commit 5f09820

File tree

5 files changed

+20
-18
lines changed

5 files changed

+20
-18
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
proto

build.sh

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ rm -rf $DEST
1111
# build a proto image - natty + packages that will install (optimization)
1212
if [ ! -d proto ]; then
1313
debootstrap natty proto
14-
cp sources.list proto/etc/apt/sources.list
14+
cp files/sources.list proto/etc/apt/sources.list
1515
chroot proto apt-get update
1616
chroot proto apt-get install -y `cat apts/* | cut -d\# -f1 | egrep -v "(rabbitmq|libvirt-bin)"`
1717
chroot proto pip install `cat pips/*`
@@ -33,17 +33,21 @@ echo "127.0.0.1 localhost $NAME" > $DEST/etc/hosts
3333
# copy kernel modules
3434
cp -pr /lib/modules/`uname -r` $DEST/lib/modules
3535

36+
# helpful screenrc
37+
cp files/screenrc $DEST/root/.screenrc
38+
3639
# copy openstack installer and requirement lists to a new directory.
3740
mkdir -p $DEST/opt
3841
cp stack.sh $DEST/opt/stack.sh
3942
cp -r pips $DEST/opt
4043
cp -r apts $DEST/opt
4144

42-
# injecting root's ssh key
43-
# FIXME: only do this if id_rsa.pub exists
44-
mkdir $DEST/root/.ssh
45-
chmod 700 $DEST/root/.ssh
46-
cp /root/.ssh/id_rsa.pub $DEST/root/.ssh/authorized_keys
45+
# injecting root's public ssh key if it exists
46+
if [ -f /root/.ssh/id_rsa.pub ]; then
47+
mkdir $DEST/root/.ssh
48+
chmod 700 $DEST/root/.ssh
49+
cp /root/.ssh/id_rsa.pub $DEST/root/.ssh/authorized_keys
50+
fi
4751

4852
# set root password to password
4953
echo root:password | chroot $DEST chpasswd

files/screenrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
hardstatus on
2+
hardstatus alwayslastline
3+
hardstatus string "%{.bW}%-w%{.rW}%n %t%{-}%+w %=%{..G}%H %{..Y}%d/%m %c"
4+
5+
defscrollback 1024
6+
7+
vbell off
8+
startup_message off
9+
File renamed without changes.

stack.sh

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -133,18 +133,6 @@ EOF
133133
exit
134134
fi
135135

136-
# Configure screen
137-
cat >~/.screenrc <<EOF
138-
hardstatus on
139-
hardstatus alwayslastline
140-
hardstatus string "%{.bW}%-w%{.rW}%n %t%{-}%+w %=%{..G}%H %{..Y}%d/%m %c"
141-
142-
defscrollback 1024
143-
144-
vbell off
145-
startup_message off
146-
EOF
147-
148136
NL=`echo -ne '\015'`
149137

150138
function screen_it {

0 commit comments

Comments
 (0)