X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=pl_mom.spec;h=4810d846d1a0bfc2ebeb00c4eab5aa702099703d;hb=67cc76870b2f956d6655a129839431b96f5f7f11;hp=6a90f787619495a4a385f18c7b2690adb661776f;hpb=362f757610352a4d8d3b4edd0c22025016e5c5e2;p=mom.git diff --git a/pl_mom.spec b/pl_mom.spec index 6a90f78..4810d84 100644 --- a/pl_mom.spec +++ b/pl_mom.spec @@ -46,26 +46,25 @@ cp pl_mom.pl $RPM_BUILD_ROOT/usr/local/planetlab/bin/ %post -RUNLEVEL=`/sbin/runlevel` - if [ "$1" -ge 1 ]; then chkconfig --add pl_mom chkconfig --level 3 pl_mom on - if [[ "$RUNLEVEL" != "unknown" ]]; then + if [[ "$PL_BOOTCD" != "1" ]]; then /etc/init.d/pl_mom stop /etc/init.d/pl_mom start fi fi %preun -RUNLEVEL=`/sbin/runlevel` - if [ "$1" -eq 0 ]; then - if [[ "$RUNLEVEL" != "unknown" ]]; then + if [[ "$PL_BOOTCD" != "1" ]]; then /etc/init.d/pl_mom stop fi + + chkconfig --del pl_mom + chkconfig pl_mom off fi