From ebcfc2ca8b6032d482414b44a2b3d44991b04d0e Mon Sep 17 00:00:00 2001 From: Mark Huang Date: Thu, 6 Jul 2006 17:44:45 +0000 Subject: [PATCH] - support non-RH distros by checking for /sbin/chkconfig before using --- myplc.spec | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) 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 -- 2.43.0