From: Mark Huang Date: Thu, 6 Jul 2006 17:44:45 +0000 (+0000) Subject: - support non-RH distros by checking for /sbin/chkconfig before using X-Git-Tag: planetlab-4_0-rc1~155 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=ebcfc2ca8b6032d482414b44a2b3d44991b04d0e;p=myplc.git - support non-RH distros by checking for /sbin/chkconfig before using --- diff --git a/myplc.spec b/myplc.spec index c236416..42203b7 100644 --- a/myplc.spec +++ b/myplc.spec @@ -73,15 +73,19 @@ if [ -x %{_sysconfdir}/init.d/plc ] ; then fi %post -chkconfig --add plc -chkconfig plc on +if [ -x /sbin/chkconfig ] ; then + /sbin/chkconfig --add plc + /sbin/chkconfig plc on +fi %preun # 0 = erase, 1 = upgrade if [ $1 -eq 0 ] ; then - service plc stop - chkconfig plc off - chkconfig --del plc + %{_sysconfdir}/init.d/plc stop + if [ -x /sbin/chkconfig ] ; then + /sbin/chkconfig plc off + /sbin/chkconfig --del plc + fi fi %files