[Fusionforge-commits] r12517 - trunk/tests/scripts

Christian Bayle cbayle at fusionforge.org
Wed Mar 2 11:26:19 CET 2011


Author: cbayle
Date: 2011-03-02 11:26:19 +0100 (Wed, 02 Mar 2011)
New Revision: 12517

Modified:
   trunk/tests/scripts/start_lxc.sh
Log:
Define lxcdir


Modified: trunk/tests/scripts/start_lxc.sh
===================================================================
--- trunk/tests/scripts/start_lxc.sh	2011-03-02 10:16:56 UTC (rev 12516)
+++ trunk/tests/scripts/start_lxc.sh	2011-03-02 10:26:19 UTC (rev 12517)
@@ -1,10 +1,11 @@
 #! /bin/sh
 
 # You need to allow current user to sudo on /usr/bin/lxc-create /usr/bin/lxc-start /usr/lib/lxc/templates/lxc-debian6.postinst
+configdir=`dirname $0`/../config
+lxcdir=`dirname $0`/../lxc
 
 if [ -z "$LXCDEBTEMPLATE" ]
 then
-	configdir=`dirname $0`/../config
 	. $configdir/default
 	if [ -f $configdir/`hostname` ] ; then . $configdir/`hostname`; fi
 fi
@@ -20,6 +21,6 @@
 	fi
 fi
 
-sudo /usr/bin/lxc-create -n $HOST -f ../lxc/config.$LXCDEBTEMPLATE -t $LXCDEBTEMPLATE
+sudo /usr/bin/lxc-create -n $HOST -f $lxcdir/config.$LXCDEBTEMPLATE -t $LXCDEBTEMPLATE
 sudo /usr/lib/lxc/templates/lxc-$LXCDEBTEMPLATE.postinst -n $HOST --address=$IPDEBBASE.$VEIDDEB --netmask=$IPDEBMASK --gateway=$IPDEBGW --pubkey=$SSHPUBKEY --hostkeydir=$HOSTKEYDIR
 sudo /usr/bin/lxc-start -n $HOST -d




More information about the Fusionforge-commits mailing list