3 # description: Create BTRFS subvolumes for LXC reference images.
16 echo $"Usage: $0 {start|stop|restart|reload|status|force}"
21 # Check if we are in the build environment
22 mount | grep 'planetlab-vservers' > /dev/null
24 [ $RETVAL -ne 0 ] && exit 0
26 # Source function library
27 . /etc/init.d/functions
29 VERSION=`yum info lxc-reference | grep Version | awk '{ print $3; }'`
31 if [ -f /vservers/lxc-reference-${VERSION}.tgz ]; then
32 mkdir -p /vservers/.lvref
33 btrfs subvolume create /vservers/.lvref/lxc-f14-x86_64
34 btrfs subvolume create /vservers/.lvref/lxc-squeeze-x86_64
35 tar zxf /vservers/lxc-reference-${VERSION}.tgz -C /vservers/
36 rm -rf /vservers/lxc-reference-${VERSION}.tgz