#!/bin/bash # chkconfig: 345 20 80 # description: Create BTRFS subvolumes for LXC reference images. # case "$1" in start|restart|reload) ;; force) FORCE=true;; stop|status) exit 0 ;; *) echo $"Usage: $0 {start|stop|restart|reload|status|force}" exit 1 ;; esac # Source function library . /etc/init.d/functions VERSION=`yum info lxc-reference | grep Version | awk '{ print $3; }'` if [ -f /vservers/lxc-reference-${VERSION}.tgz ]; then mkdir -p /vservers/.lvref btrfs subvolume /vservers/.lvref/lxc-f14-x86_86 btrfs subvolume /vservers/.lvref/lxc-squeeze-x86_86 tar zxvf /vservers/lxc-reference-${VERSION}.tgz -C /vservers/tmp rm -rf /vservers/lxc-reference-${VERSION}.tgz fi exit 0