Skip to content

Commit f1a9814

Browse files
committed
Merge branch 'master' of github.com:cloudbuilders/devstack
2 parents a50a346 + ee506ac commit f1a9814

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

stack.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,11 @@ failed() {
270270
# an error. It is also useful for following along as the install occurs.
271271
set -o xtrace
272272

273+
# create the destination directory and ensure it is writable by the user
273274
sudo mkdir -p $DEST
274-
sudo chown `whoami` $DEST
275+
if [ ! -w $DEST ]; then
276+
sudo chown `whoami` $DEST
277+
fi
275278

276279
# Install Packages
277280
# ================
@@ -300,8 +303,6 @@ function git_clone {
300303
fi
301304

302305
if [ ! -d $2 ]; then
303-
sudo mkdir $2
304-
sudo chown `whoami` $2
305306
git clone $1 $2
306307
cd $2
307308
# This checkout syntax works for both branches and tags

tools/build_usb_boot.sh

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,25 @@ if [ -b $DEST_DIR ]; then
2121
# We have a block device, install syslinux and mount it
2222
DEST_DEV=$DEST_DIR
2323
DEST_DIR=`mktemp -d mntXXXXXX`
24+
mount $DEST_DEV $DEST_DIR
25+
26+
if [ ! -d $DEST_DIR/syslinux ]; then
27+
mkdir -p $DEST_DIR/syslinux
28+
fi
2429

2530
# Install syslinux on the device
2631
syslinux --install --directory syslinux $DEST_DEV
27-
28-
mount $DEST_DEV $DEST_DIR
2932
else
3033
# We have a directory (for sanity checking output)
31-
DEST_DEV=""
32-
if [ ! -d $DEST_DIR/syslinux ]; then
33-
mkdir -p $DEST_DIR/syslinux
34-
fi
34+
DEST_DEV=""
35+
if [ ! -d $DEST_DIR/syslinux ]; then
36+
mkdir -p $DEST_DIR/syslinux
37+
fi
3538
fi
3639

3740
# Get some more stuff from syslinux
3841
for i in memdisk menu.c32; do
39-
cp -p /usr/lib/syslinux/$i $DEST_DIR/syslinux
42+
cp -p /usr/lib/syslinux/$i $DEST_DIR/syslinux
4043
done
4144

4245
CFG=$DEST_DIR/syslinux/syslinux.cfg

0 commit comments

Comments
 (0)