X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=NodeManager.spec;h=164492c3a2c88c0ecbe9501bbd5fed85e41defa2;hb=2823a46b5922dc6f745af259277e7440a0ae8ebb;hp=e025afa35c7d04ed5f08a05532e03a769e8a3726;hpb=4086543f644fc0b0e34b22c28ffa4925fcc394cb;p=nodemanager.git diff --git a/NodeManager.spec b/NodeManager.spec index e025afa..164492c 100644 --- a/NodeManager.spec +++ b/NodeManager.spec @@ -1,7 +1,7 @@ Summary: PlanetLab Node Manager Name: NodeManager -Version: 1.1 -Release: 1%{?pldistro:.%{pldistro}}%{?date:.%{date}} +Version: 1.5 +Release: 2%{?pldistro:.%{pldistro}}%{?date:.%{date}} License: PlanetLab Group: System Environment/Daemons URL: http://cvs.planet-lab.org/cvs/NodeManager @@ -13,7 +13,7 @@ Obsoletes: sidewinder, sidewinder-common # vuseradd, vuserdel Requires: vserver-reference -Requires: util-vserver +Requires: util-vserver >= 0.30.208-17 # vserver.py Requires: util-vserver-python @@ -44,9 +44,30 @@ local operations on slices. rm -rf $RPM_BUILD_ROOT %{__make} %{?_smp_mflags} install DESTDIR="$RPM_BUILD_ROOT" +install -D -m 755 conf_files.init $RPM_BUILD_ROOT/%{_initrddir}/conf_files install -D -m 755 nm.init $RPM_BUILD_ROOT/%{_initrddir}/nm install -D -m 644 nm.logrotate $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d/nm +%post +if [ -e /var/log/nm ] ; then + gzip /var/log/nm +fi +chkconfig --add conf_files +chkconfig conf_files on +chkconfig --add nm +chkconfig nm on +service nm restart + + +%preun +# 0 = erase, 1 = upgrade +if [ $1 -eq 0 ] ; then + chkconfig nm off + chkconfig --del nm + chkconfig conf_files off + chkconfig --del conf_files +fi + %clean rm -rf $RPM_BUILD_ROOT @@ -57,6 +78,7 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/NodeManager/* %{_bindir}/forward_api_calls %{_initrddir}/nm +%{_initrddir}/conf_files %{_sysconfdir}/logrotate.d/nm %changelog