Browse code

Minor fixes

Dean Troyer authored on 2011/09/14 03:22:14
Showing 1 changed files
... ...
@@ -37,7 +37,7 @@ NOVNC_DIR=$DEST/noVNC
37 37
 
38 38
 # Use the first IP unless an explicit is set by ``HOST_IP`` environment variable
39 39
 if [ ! -n "$HOST_IP" ]; then
40
-    HOST_IP=`LC_ALL=C ifconfig  | grep -m 1 'inet addr:'| cut -d: -f2 | awk '{print $1}'`
40
+    HOST_IP=`LC_ALL=C /sbin/ifconfig  | grep -m 1 'inet addr:'| cut -d: -f2 | awk '{print $1}'`
41 41
 fi
42 42
 
43 43
 # Nova network configuration
... ...
@@ -145,16 +145,16 @@ fi
145 145
 # of installing quantum we can create a simple module that will pass the 
146 146
 # initial imports
147 147
 mkdir $DASH_DIR/openstack-dashboard/quantum || true
148
-touch $DASH_DIR/openstack-dashboard/quantum/__init__.py
149
-touch $DASH_DIR/openstack-dashboard/quantum/client.py
148
+touch $DASH_DIR/openstack-dashboard/quantum/__init__.py || true
149
+touch $DASH_DIR/openstack-dashboard/quantum/client.py || true
150 150
 
151 151
 cd $DASH_DIR/openstack-dashboard
152
-cp local/local_settings.py.example local/local_settings.py
152
+[ ! -r local/local_settings.py ] && cp local/local_settings.py.example local/local_settings.py
153 153
 dashboard/manage.py syncdb
154 154
 
155 155
 # setup apache
156 156
 # create an empty directory to use as our 
157
-mkdir $DASH_DIR/.blackhole
157
+mkdir -p $DASH_DIR/.blackhole
158 158
 
159 159
 # FIXME(ja): can't figure out how to make $DASH_DIR work in sed, also install to available/a2e it 
160 160
 cat $DIR/files/000-default.template | sed 's/%DASH_DIR%/\/opt\/dash/g' > /tmp/000-default