using alternate location for tarball while build is down
[lxc-reference.git] / initscript / lxc-reference
index e361e1f..50cb01d 100644 (file)
@@ -18,6 +18,11 @@ case "$1" in
         ;;
 esac
 
+# Check if we are in the build environment
+mount | grep 'planetlab-vservers' > /dev/null
+RETVAL=$?
+[ $RETVAL -ne 0 ] && exit 0
+
 # Source function library
 . /etc/init.d/functions
 
@@ -27,7 +32,7 @@ if [ -f /vservers/lxc-reference-${VERSION}.tgz ]; then
     mkdir -p /vservers/.lvref
     btrfs subvolume create /vservers/.lvref/lxc-f14-x86_64
     btrfs subvolume create /vservers/.lvref/lxc-squeeze-x86_64
-    tar zxvf /vservers/lxc-reference-${VERSION}.tgz -C /vservers/
+    tar zxf /vservers/lxc-reference-${VERSION}.tgz -C /vservers/
     rm -rf /vservers/lxc-reference-${VERSION}.tgz
 fi