From 2506a595b73b24dc6098c6b9c200ccb16a46bf20 Mon Sep 17 00:00:00 2001 From: slerena Date: Mon, 22 Aug 2011 00:41:14 +0000 Subject: [PATCH] 2011-08-22 Sancho Lerena * pandora_server.spec: Update of spec to be used in Opensuse Build Service. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4794 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_server/ChangeLog | 5 +++++ pandora_server/pandora_server.spec | 12 ++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index 819761047e..c82068fab5 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,8 @@ +2011-08-22 Sancho Lerena + + * pandora_server.spec: Update of spec to be used in Opensuse Build + Service. + 2011-08-19 Sancho Lerena * DEBIAN/control diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec index eb1ef5dd06..6e7fac66fe 100644 --- a/pandora_server/pandora_server.spec +++ b/pandora_server/pandora_server.spec @@ -17,8 +17,9 @@ Group: System/Monitoring Packager: Sancho Lerena Prefix: /usr/share BuildRoot: %{_tmppath}/%{name}-buildroot -BuildArchitectures: noarch -Requires(pre): /usr/sbin/useradd +BuildArch: noarch +PreReq: %fillup_prereq %insserv_prereq /usr/bin/sed /usr/bin/grep /usr/sbin/useradd +BuildRequires: sysvinit cron rsyslog sysconfig AutoReq: 0 Provides: %{name}-%{version} Requires: perl-DBI perl-DBD-mysql perl-libwww-perl @@ -85,12 +86,15 @@ rm -f $RPM_BUILD_ROOT%{prefix}/pandora_server/util/recon_scripts/PandoraFMS rm -fr $RPM_BUILD_ROOT %pre -/usr/sbin/useradd -d %{prefix}/pandora -s /bin/false -M -g 0 pandora +if [ "`id pandora | grep uid | wc -l`" = 0 ] +then + /usr/sbin/useradd -d %{prefix}/pandora -s /bin/false -M -g 0 pandora +fi + if [ -e "/etc/pandora/pandora_server.conf" ] then cat /etc/pandora/pandora_server.conf > /etc/pandora/pandora_server.conf.old fi -exit 0 %post chkconfig pandora_server on