From efcd724c944f1e24827ea28036ab2416a081b85c Mon Sep 17 00:00:00 2001 From: koichirok Date: Wed, 27 Jun 2012 07:02:52 +0000 Subject: [PATCH] 2012-06-27 Koichiro Kikuchi * pandora_server.redhat.spec: Small fixes: removed duplicated useradd line, don't remove pandora user after uninstall, added collections directory. Merged from 4.0 branch. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6719 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_server/ChangeLog | 8 ++++++++ pandora_server/pandora_server.redhat.spec | 12 +++++------- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index cbc804b799..64b1a03637 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,11 @@ +2012-06-27 Kikuchi Koichiro + + * pandora_server.redhat.spec: Small fixes: removed duplicated useradd + line, don't remove pandora user after uninstall, added collections + directory. + + Merged from 4.0 branch. + 2012-06-25 Juan Manuel Ramon * lib/PandoraFMS/Core.pm: Added deletion of tags when a module is diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec index ee0c8b13e8..43585a5345 100644 --- a/pandora_server/pandora_server.redhat.spec +++ b/pandora_server/pandora_server.redhat.spec @@ -19,9 +19,9 @@ Prefix: %{_datadir} BuildRoot: %{_tmppath}/%{name}-buildroot BuildArchitectures: noarch Prereq: /sbin/chkconfig, /sbin/service -Prereq: %{_sbindir}/useradd AutoReq: 0 Provides: %{name}-%{version} +Requires(pre): shadow-utils Requires: coreutils Requires: perl-DBI perl-DBD-mysql perl-libwww-perl Requires: perl-XML-Simple perl-XML-Twig net-snmp-utils @@ -48,6 +48,7 @@ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/pandora/ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/spool/pandora/data_in mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/spool/pandora/data_in/conf mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/spool/pandora/data_in/md5 +mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/spool/pandora/data_in/collections mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/pandora/ mkdir -p $RPM_BUILD_ROOT%{prefix}/pandora_server/conf/ mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1/ @@ -87,14 +88,14 @@ chmod 0755 $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/pandora_db rm -fr $RPM_BUILD_ROOT %pre -/usr/sbin/useradd -d %{prefix}/pandora_server -s /bin/false -M -g 0 pandora +getent passwd pandora >/dev/null || \ + /usr/sbin/useradd -d %{prefix}/pandora_server -s /sbin/nologin -M -g 0 pandora + if [ -e "/etc/pandora/pandora_server.conf" ] then cat /etc/pandora/pandora_server.conf > /etc/pandora/pandora_server.conf.old fi -id pandora >/dev/null 2>&1 || \ -/usr/sbin/useradd -d /var/spool/pandora -s /sbin/nologin -m -g 0 pandora 2> /dev/null exit 0 %post @@ -126,7 +127,6 @@ fi /sbin/service tentacle_serverd stop &>/dev/null /sbin/chkconfig --del pandora_server /sbin/chkconfig --del tentacle_serverd -userdel pandora exit 0 @@ -138,8 +138,6 @@ exit 0 %{_sysconfdir}/cron.daily/pandora_db %config(noreplace) %{_sysconfdir}/logrotate.d/pandora_server - - %defattr(755,pandora,root) %{prefix}/pandora_server /usr/lib/perl5/PandoraFMS