X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=scripts%2Fcreate-vm.sh;h=b52c351571e171262d189e9c13f5e844cd7949dc;hb=a8aa1baef6f4d1df60f44d1d542912acff913226;hp=f509c0daca92ba652db2e86b6e0303b54ef6782b;hpb=c83e260c64091dc565294a670212218d7101ebe0;p=infrastructure.git diff --git a/scripts/create-vm.sh b/scripts/create-vm.sh index f509c0d..b52c351 100755 --- a/scripts/create-vm.sh +++ b/scripts/create-vm.sh @@ -5,18 +5,13 @@ DIRNAME=$(dirname $0) BUILD="${HOME}/git-build" -echo "Updating $BUILD" -cd $BUILD -git pull -cd - - LOGS=$HOME/machines [ -d $LOGS ] || { echo "Creating logs dir $LOGS" ; mkdir -p $LOGS; } DOMAIN=pl.sophia.inria.fr -DEFAULT_DISTRO=f22 +DEFAULT_DISTRO=f25 DEFAULT_MEMORY=4096 CONFIRM= @@ -62,6 +57,11 @@ container="$1" ; shift [ -d "$BUILD" ] || usage "Could not find directory $BUILD" [ -d /vservers/$container ] && usage "container $container already exists in /vservers" +echo "Updating $BUILD" +cd $BUILD +git pull +cd - + # compute all vars from args [ -z "$DISTRO" ] && DISTRO="$DEFAULT_DISTRO" [ -z "$MEMORY" ] && MEMORY="$DEFAULT_MEMORY"