From 9290339ef4583fa6a326101f648e67cad56a2375 Mon Sep 17 00:00:00 2001 From: slerena Date: Sun, 23 Aug 2009 21:52:53 +0000 Subject: [PATCH] 2009-08-22 Sancho Lerena * linux/pandora_agent.spec: Update uninstall process. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1873 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_agents/ChangeLog | 4 +++ pandora_agents/linux/pandora_agent.spec | 47 ++++++++++--------------- 2 files changed, 23 insertions(+), 28 deletions(-) diff --git a/pandora_agents/ChangeLog b/pandora_agents/ChangeLog index 19b6b4efbf..14426c590d 100644 --- a/pandora_agents/ChangeLog +++ b/pandora_agents/ChangeLog @@ -1,3 +1,7 @@ +2009-08-22 Sancho Lerena + + * linux/pandora_agent.spec: Update uninstall process. + 2009-08-20 Sancho Lerena * bsd-ipso/pandora_agent.sh diff --git a/pandora_agents/linux/pandora_agent.spec b/pandora_agents/linux/pandora_agent.spec index efc688ff1e..90a755812a 100755 --- a/pandora_agents/linux/pandora_agent.spec +++ b/pandora_agents/linux/pandora_agent.spec @@ -104,43 +104,34 @@ fi %endif %preun -if [ "$1" = 0 ]; then - /etc/init.d/pandora_agent_daemon stop - /usr/sbin/userdel pandora - rm /usr/bin/pandora_agent - rm /usr/bin/tentacle_client - rm /etc/init.d/pandora_agent_daemon - rm -Rf /usr/share/pandora_agent/ - rm -Rf /etc/pandora/pandora_agent.conf - rm -Rf /etc/pandora/plugins - rm -Rf /var/spool/pandora/data_out - rm -Rf /var/log/pandora/pandora_agent* 2> /dev/null + +/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 -fi +%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 %defattr(750,pandora,root) -%if "%{_vendor}" == "redhat" /usr/bin/pandora_agent -%else -/usr/bin/pandora_agent -%endif + %defattr(770,pandora,root) /var/log/pandora/ -/var/spool/pandora/ /var/spool/pandora/data_out + %defattr(755,pandora,root) /usr/bin/tentacle_client /etc/init.d/pandora_agent_daemon