File tree Expand file tree Collapse file tree 5 files changed +20
-18
lines changed
Expand file tree Collapse file tree 5 files changed +20
-18
lines changed Original file line number Diff line number Diff line change 1+ proto
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ rm -rf $DEST
1111# build a proto image - natty + packages that will install (optimization)
1212if [ ! -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
3434cp -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.
3740mkdir -p $DEST /opt
3841cp stack.sh $DEST /opt/stack.sh
3942cp -r pips $DEST /opt
4043cp -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
4953echo root:password | chroot $DEST chpasswd
Original file line number Diff line number Diff line change 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.
Original file line number Diff line number Diff line change 133133 exit
134134fi
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-
148136NL=` echo -ne ' \015' `
149137
150138function screen_it {
You can’t perform that action at this time.
0 commit comments