Permalink
Browse files

Merge pull request #12 from cloudfoundry/fix_ubuntu_deboot

fix ubuntu deboostrap
  • Loading branch information...
2 parents 3703f80 + e9fa29c commit d2d93dd1f215f0c4c26e7236e01fbfc2a1800c38 CloudFoundry Services Team committed Mar 21, 2013
Showing with 13 additions and 12 deletions.
  1. +13 −12 warden/root/linux/rootfs/ubuntu.sh
@@ -17,18 +17,6 @@ then
fi
function debootstrap() {
- if [ -d $target ]
- then
- read -p "Target directory already exists. Erase it? "
- if [[ $REPLY =~ ^[Yy].*$ ]]
- then
- rm -rf $target
- else
- echo "Aborting..."
- exit 1
- fi
- fi
-
# -v is too new, revert to old trick
# ${VAR+X} will be
# X when VAR is unset
@@ -68,6 +56,19 @@ then
fi
target=$1
+
+if [ -d $target ]
+then
+ read -p "Target directory already exists. Erase it? "
+ if [[ $REPLY =~ ^[Yy].*$ ]]
+ then
+ rm -rf $target
+ else
+ echo "Aborting..."
+ exit 1
+ fi
+fi
+
mkdir -p $target
debootstrap

0 comments on commit d2d93dd

Please sign in to comment.