From 3b2daf0bbfa9ae9707cf871f6cbdb9c796ccf9b5 Mon Sep 17 00:00:00 2001 From: slerena Date: Tue, 1 Sep 2009 16:31:14 +0000 Subject: [PATCH] 2009-09-01 Sancho Lerena * linux/pandora_agent.spec: Using chkconfig to manage service instalation/deinstallation. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1901 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_agents/ChangeLog | 6 ++++++ pandora_agents/linux/pandora_agent.spec | 24 ++---------------------- 2 files changed, 8 insertions(+), 22 deletions(-) diff --git a/pandora_agents/ChangeLog b/pandora_agents/ChangeLog index 14426c590d..f75167f3da 100644 --- a/pandora_agents/ChangeLog +++ b/pandora_agents/ChangeLog @@ -1,3 +1,9 @@ +2009-09-01 Sancho Lerena + + * linux/pandora_agent.spec: Using chkconfig to manage service + instalation/deinstallation. + + 2009-08-22 Sancho Lerena * linux/pandora_agent.spec: Update uninstall process. diff --git a/pandora_agents/linux/pandora_agent.spec b/pandora_agents/linux/pandora_agent.spec index 90a755812a..d92ac69b5a 100755 --- a/pandora_agents/linux/pandora_agent.spec +++ b/pandora_agents/linux/pandora_agent.spec @@ -92,36 +92,16 @@ if [ ! -e /etc/pandora/pandora_agent.conf ]; then ln -s /usr/share/pandora_agent/pandora_agent.conf /etc/pandora/pandora_agent.conf fi -%if "%{_vendor}" == "redhat" - ln -s /etc/init.d/pandora_agent_daemon /etc/rc0.d/K99pandora_agent_daemon - ln -s /etc/init.d/pandora_agent_daemon /etc/rc3.d/S99pandora_agent_daemon - ln -s /etc/init.d/pandora_agent_daemon /etc/rc5.d/S99pandora_agent_daemon -%else - ln -s /etc/init.d/pandora_agent_daemon /etc/rc.d/rc5.d/S99pandora_agent_daemon - ln -s /etc/init.d/pandora_agent_daemon /etc/rc.d/rc3.d/S99pandora_agent_daemon - ln -s /etc/init.d/pandora_agent_daemon /etc/rc.d/rc2.d/S99pandora_agent_daemon - ln -s /etc/init.d/pandora_agent_daemon /etc/rc.d/rc0.d/K99pandora_agent_daemon -%endif +chkconfig -s pandora_agent_daemon on %preun +chkconfig -d pandora_agent_daemon /etc/init.d/pandora_agent_daemon stop rm /etc/init.d/pandora_agent_daemon /usr/sbin/userdel pandora rm -Rf /etc/pandora/pandora_agent.conf rm -Rf /var/log/pandora/pandora_agent* 2> /dev/null - -%if "%{_vendor}" == "redhat" - /sbin/chkconfig --del pandora_agent_daemon - rm /etc/rc0.d/K99pandora_agent_daemon - rm /etc/rc3.d/S99pandora_agent_daemon - rm /etc/rc5.d/S99pandora_agent_daemon -%else - rm /etc/rc.d/rc5.d/S99pandora_agent_daemon - rm /etc/rc.d/rc3.d/S99pandora_agent_daemon - rm /etc/rc.d/rc2.d/S99pandora_agent_daemon - rm /etc/rc.d/rc0.d/K99pandora_agent_daemon -%endif exit 0 %files