Add check to the initscript so that it won't do anything when it is
inside the build environment.
;;
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
install -D -m 755 initscript/lxc-reference ${RPM_BUILD_ROOT}/%{_initrddir}/lxc-reference
popd
+%post
+service lxc-reference restart
+
%preun
btrfs subvolume delete /vservers/.lvref/lxc-f14-x86_64
btrfs subvolume delete /vservers/.lvref/lxc-squeeze-x86_64