From b29d4394c20d55c91856e44da143589ada961321 Mon Sep 17 00:00:00 2001 From: KIKUCHI Koichiro Date: Thu, 3 Mar 2016 18:57:00 +0900 Subject: [PATCH] Redhat compliant fixes in %preun - don't delete pandora user. see https://fedoraproject.org/wiki/Packaging:UsersAndGroups#Allocation_Strategies - don't delete log files and files which created by user. --- pandora_agents/unix/pandora_agent.redhat.spec | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec index 49fa0f4f15..9301f6faf2 100644 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -114,21 +114,24 @@ fi /sbin/chkconfig --del pandora_agent_daemon /etc/rc.d/init.d/pandora_agent_daemon stop >/dev/null 2>&1 || : -/usr/sbin/userdel pandora -rm -Rf /etc/pandora/pandora_agent.conf -rm -Rf /var/log/pandora/pandora_agent* 2> /dev/null -rm -Rf /usr/share/pandora_agent + +# Remove symbolic links +pushd /etc/pandora +for f in pandora_agent.conf plugins collections +do + [ -L $f ] && rm -f $f +done exit 0 %files -%defattr(750,pandora,root) +%defattr(750,root,root) /usr/bin/pandora_agent -/usr/bin/pandora_agent_exec %defattr(755,pandora,root) %{prefix}/pandora_agent %defattr(755,root,root) +/usr/bin/pandora_agent_exec /usr/bin/tentacle_client /etc/rc.d/init.d/pandora_agent_daemon