Browse code

configuring stack user is optional

Anthony Young authored on 2011/11/11 06:46:52
Showing 1 changed files
... ...
@@ -187,10 +187,13 @@ cat > localrc <<LOCAL_EOF
187 187
 ROOTSLEEP=0
188 188
 `cat $TOP_DIR/localrc`
189 189
 LOCAL_EOF
190
+# Disable byobu
191
+byobu-disable
190 192
 EOF
191 193
 
192 194
 # Setup stack user with our key
193
-if [ -e ~/.ssh/id_rsa.pub ]; then
195
+CONFIGURE_STACK_USER=${CONFIGURE_STACK_USER:-yes}
196
+if [[ -e ~/.ssh/id_rsa.pub  && "$CONFIGURE_STACK_USER" = "yes" ]]; then
194 197
     PUB_KEY=`cat  ~/.ssh/id_rsa.pub`
195 198
     cat >> $vm_dir/uec/user-data<<EOF
196 199
 mkdir -p /opt/stack
... ...
@@ -206,8 +209,6 @@ grep -q "^#includedir.*/etc/sudoers.d" /etc/sudoers ||
206 206
     echo "#includedir /etc/sudoers.d" >> /etc/sudoers
207 207
 ( umask 226 && echo "stack ALL=(ALL) NOPASSWD:ALL" \
208 208
     > /etc/sudoers.d/50_stack_sh )
209
-# Disable byobu
210
-byobu-disable
211 209
 EOF
212 210
 fi
213 211