Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #12 from cloudfoundry/fix_ubuntu_deboot

fix ubuntu deboostrap
  • Loading branch information...
commit d2d93dd1f215f0c4c26e7236e01fbfc2a1800c38 2 parents 3703f80 + e9fa29c
CloudFoundry Services Team authored
Showing with 13 additions and 12 deletions.
  1. +13 −12 warden/root/linux/rootfs/ubuntu.sh
View
25 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
Please sign in to comment.
Something went wrong with that request. Please try again.