From: Marco Yuen Date: Wed, 4 Jan 2012 15:52:51 +0000 (-0500) Subject: Restart lxc-reference after installation. X-Git-Tag: lxcbuild^0 X-Git-Url: http://git.onelab.eu/?p=lxc-reference.git;a=commitdiff_plain;h=6802629312e33e8db5142467b6326cf2d56f4b32 Restart lxc-reference after installation. Add check to the initscript so that it won't do anything when it is inside the build environment. --- diff --git a/initscript/lxc-reference b/initscript/lxc-reference index bdf6058..50cb01d 100644 --- a/initscript/lxc-reference +++ b/initscript/lxc-reference @@ -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 diff --git a/lxc-reference.spec b/lxc-reference.spec index ee55822..1fccf02 100644 --- a/lxc-reference.spec +++ b/lxc-reference.spec @@ -29,6 +29,9 @@ pushd /longbuildroot/SOURCES/lxc-reference-%{version} 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