All of lore.kernel.org
 help / color / mirror / Atom feed
From: rmccabe@sourceware.org <rmccabe@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] conga clustermon.spec.in.in conga.spec.in.in
Date: 30 Apr 2007 18:47:33 -0000	[thread overview]
Message-ID: <20070430184733.8345.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	conga
Branch: 	RHEL5
Changes by:	rmccabe at sourceware.org	2007-04-30 19:47:32

Modified files:
	.              : clustermon.spec.in.in conga.spec.in.in 

Log message:
	spec file cleanups to make tests using grep against /etc/{passwd,group} more strict, and to avoid harmless failure messages in %post

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/clustermon.spec.in.in.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.18.2.16&r2=1.18.2.17
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/conga.spec.in.in.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.45.2.34&r2=1.45.2.35

--- conga/clustermon.spec.in.in	2007/04/11 20:15:31	1.18.2.16
+++ conga/clustermon.spec.in.in	2007/04/30 18:47:32	1.18.2.17
@@ -91,7 +91,8 @@
 /sbin/chkconfig --add modclusterd
 DBUS_PID=`cat /var/run/messagebus.pid 2> /dev/null`
 /bin/kill -s SIGHUP $DBUS_PID > /dev/null 2>&1
-/sbin/service oddjobd reload > /dev/null 2>&1
+# It's ok if this fails (it will fail when oddjob is not running).
+/sbin/service oddjobd reload > /dev/null 2>&1 || true
 
 %preun -n modcluster
 if [ "$1" == "0" ]; then
@@ -137,7 +138,7 @@
 			%{_docdir}/cluster-snmp-%{version}/
 
 %post -n cluster-snmp
-/sbin/service snmpd condrestart > /dev/null 2>&1
+/sbin/service snmpd condrestart > /dev/null 2>&1 || true
 
 %postun -n cluster-snmp
 # don't restart snmpd twice on upgrades
@@ -172,9 +173,8 @@
 			%{_docdir}/cluster-cim-%{version}/
 
 %post -n cluster-cim
-/sbin/service tog-pegasus condrestart > /dev/null 2>&1
 # pegasus might not be running, don't fail %post
-exit 0
+/sbin/service tog-pegasus condrestart > /dev/null 2>&1 || true
 
 %postun -n cluster-cim
 # don't restart pegasus twice on upgrades
@@ -194,12 +194,13 @@
 
 %changelog
 
-* Wed Apr 11 2007 Ryan McCabe <rmccabe@redhat.com> 0.9.2-7
+* Mon Apr 30 2007 Ryan McCabe <rmccabe@redhat.com> 0.9.2-7
 
 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 XXXXXXXXXXXXXXXXXXX UPDATE NOT RELEASED YET XXXXXXXXXXXXXXXXXXX
 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
+
 * Wed Apr 11 2007 Ryan McCabe <rmccabe@redhat.com> 0.9.2-5
 - Version bump
 - Related: bz229027, bz230447, bz230452, bz230454, bz230457,
--- conga/conga.spec.in.in	2007/04/11 20:15:31	1.45.2.34
+++ conga/conga.spec.in.in	2007/04/30 18:47:32	1.45.2.35
@@ -131,10 +131,10 @@
 %endif
 
 %pre -n luci
-if ! /bin/grep luci\:x /etc/group 2>&1 >/dev/null; then
+if ! /bin/grep ^luci\:x /etc/group 2>&1 >/dev/null; then
    /usr/sbin/groupadd -r -f luci >/dev/null 2>&1
 fi
-if ! /bin/grep luci\:x /etc/passwd 2>&1 >/dev/null; then
+if ! /bin/grep ^luci\:x /etc/passwd 2>&1 >/dev/null; then
    /usr/sbin/useradd -r -M -s /sbin/nologin -d /var/lib/luci -g luci luci >/dev/null 2>&1
 fi
 
@@ -244,18 +244,18 @@
 			%{_libexecdir}/ricci-modlog
 
 %pre -n ricci
-if ! /bin/grep ricci\:x /etc/group 2>&1 >/dev/null; then
+if ! /bin/grep ^ricci\:x /etc/group 2>&1 >/dev/null; then
    /usr/sbin/groupadd -r -f ricci >/dev/null 2>&1
 fi
-if ! /bin/grep ricci\:x /etc/passwd 2>&1 >/dev/null; then
+if ! /bin/grep ^ricci\:x /etc/passwd 2>&1 >/dev/null; then
    /usr/sbin/useradd -r -M -s /sbin/nologin -d /var/lib/ricci -g ricci ricci >/dev/null 2>&1
 fi
 
 %post -n ricci
-/sbin/chkconfig --add ricci
 DBUS_PID=`cat /var/run/messagebus.pid 2> /dev/null`
 /bin/kill -s SIGHUP $DBUS_PID > /dev/null 2>&1
 /sbin/service oddjobd reload >/dev/null 2>&1
+/sbin/chkconfig --add ricci
 
 %preun -n ricci
 if [ "$1" == "0" ]; then
@@ -282,7 +282,7 @@
 
 %changelog
 
-* Wed Apr 11 2007 Ryan McCabe <rmccabe@redhat.com> 0.9.2-7
+* Mon Apr 30 2007 Ryan McCabe <rmccabe@redhat.com> 0.9.2-7
 
 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 XXXXXXXXXXXXXXXXXXX UPDATE NOT RELEASED YET XXXXXXXXXXXXXXXXXXX



             reply	other threads:[~2007-04-30 18:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-30 18:47 rmccabe [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-03-19 20:10 [Cluster-devel] conga clustermon.spec.in.in conga.spec.in.in rmccabe
2007-08-09 22:34 rmccabe
2007-07-30  6:13 rmccabe
2007-07-16 21:11 rmccabe
2007-05-03 19:55 rmccabe
2007-04-25 18:08 rmccabe
2007-04-12 19:56 rmccabe
2007-04-11 20:12 rmccabe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070430184733.8345.qmail@sourceware.org \
    --to=rmccabe@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.