exit
fi
if [ -z "$1" ]
- then echo "need arg $1 for chroot to make"
+ then echo "Need arg $1 for chroot to make"
exit
fi
chrootdir="$1"
-echo "creating chroot '$chrootdir'"
+
+if [ -e /opt/chroot/$chrootdir ]; then
+ echo "/opt/chroot/$chrootdir already exists"
+ exit
+fi
+
+echo "Creating chroot dir '$chrootdir'"
# Create coriolis chroot dir in /opt
-mkdir -p /opt/chroot/$chrootdir
+mkdir /opt/chroot/$chrootdir
# Install debootstrap and schroot
if [ -e /etc/debian_version ]; then