From: rmccabe@sourceware.org <rmccabe@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] conga conga.spec.in.in
Date: 11 Aug 2007 04:23:32 -0000 [thread overview]
Message-ID: <20070811042332.5199.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: conga
Changes by: rmccabe at sourceware.org 2007-08-11 04:23:31
Modified files:
. : conga.spec.in.in
Log message:
Fixes from the RHEL5 branch
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/conga.spec.in.in.diff?cvsroot=cluster&r1=1.80&r2=1.81
--- conga/conga.spec.in.in 2007/07/16 22:21:31 1.80
+++ conga/conga.spec.in.in 2007/08/11 04:23:31 1.81
@@ -134,18 +134,37 @@
%endif
%pre -n luci
-if ! /bin/grep ^luci\:x /etc/group >&/dev/null; then
+grep ^luci\:x /etc/group >&/dev/null
+if [ $? -ne 0 ]; then
/usr/sbin/groupadd -r -f luci >&/dev/null
fi
-if ! /bin/grep ^luci\:x /etc/passwd >&/dev/null; then
+
+grep ^luci\:x /etc/passwd >&/dev/null
+if [ $? -ne 0 ]; then
/usr/sbin/useradd -r -M -s /sbin/nologin -d /var/lib/luci -g luci luci >&/dev/null
fi
+if [ $1 -gt 1 ]; then
+ # Package upgrade
+ /sbin/service luci status >&/dev/null
+ LUCI_RUNNING=$?
+ if [ $LUCI_RUNNING -eq 0 ]; then
+ /sbin/service luci stop >& /dev/null
+ # allow the zope machinery time to shut down
+ sleep 4
+ fi
+ /usr/sbin/luci_admin backup >&/dev/null
+ if [ $LUCI_RUNNING -eq 0 ]; then
+ /sbin/service luci start >& /dev/null
+ fi
+fi
+exit 0
+
%post -n luci
/sbin/chkconfig --add luci
/sbin/service luci status >&/dev/null
LUCI_RUNNING=$?
-if [ "$LUCI_RUNNING" == "0" ]; then
+if [ $LUCI_RUNNING -eq 0 ]; then
/sbin/service luci stop >&/dev/null
fi
if [ -f /var/lib/luci/var/luci_backup.xml ]; then
@@ -157,28 +176,30 @@
grep True /var/lib/luci/.default_password_has_been_reset >&/dev/null
if [ $? -ne 0 ]; then
/usr/sbin/luci_admin password --random >&/dev/null &&
- rm -f /var/lib/luci/var/Data.fs.index /var/lib/luci/var/Data.fs.tmp /var/lib/luci/var/Data.fs.old
- find %{_libdir}/luci/zope/var -print0 2>/dev/null | xargs -0 chown luci:
+ rm -f /var/lib/luci/var/Data.fs.index /var/lib/luci/var/Data.fs.tmp /var/lib/luci/var/Data.fs.old >& /dev/null
+ find %{_libdir}/luci/zope/var -print0 2>/dev/null | xargs -0 chown luci: >&/dev/null
fi
-if [ "$LUCI_RUNNING" == "0" ]; then
+if [ $LUCI_RUNNING -eq 0 ]; then
/sbin/service luci start >&/dev/null
fi
+exit 0
%preun -n luci
-if [ "$1" == "0" ]; then
+if [ $1 -eq 0 ]; then
+ # uninstall
/sbin/service luci stop >&/dev/null
/sbin/chkconfig --del luci
-fi
-/sbin/service luci status >&/dev/null
-LUCI_RUNNING=$?
-if [ "$LUCI_RUNNING" == "0" ]; then
- /sbin/service luci stop >&/dev/null
-fi
-/usr/sbin/luci_admin backup >&/dev/null
-if [ "$LUCI_RUNNING" == "0" ]; then
- /sbin/service luci start >&/dev/null
-fi
+ /sbin/service luci status >&/dev/null
+ LUCI_RUNNING=$?
+ if [ $LUCI_RUNNING -eq 0 ]; then
+ /sbin/service luci stop >&/dev/null
+ # allow the zope machinery time to shut down
+ sleep 4
+ fi
+ /usr/sbin/luci_admin backup >&/dev/null
+fi
+exit 0
@@ -193,7 +214,7 @@
Requires: initscripts
Requires: oddjob dbus openssl pam cyrus-sasl >= 2.1
Requires: sed util-linux
-Requires: modcluster >= 0.8
+Requires: modcluster >= 0.10.0
# modreboot
@@ -257,18 +278,21 @@
if ! /bin/grep ^ricci\:x /etc/passwd >&/dev/null; then
/usr/sbin/useradd -r -M -s /sbin/nologin -d /var/lib/ricci -g ricci ricci >&/dev/null
fi
+exit 0
%post -n ricci
DBUS_PID=`cat /var/run/messagebus.pid 2>/dev/null`
/bin/kill -s SIGHUP $DBUS_PID >&/dev/null
/sbin/service oddjobd reload >&/dev/null
/sbin/chkconfig --add ricci
+exit 0
%preun -n ricci
if [ "$1" == "0" ]; then
/sbin/service ricci stop >&/dev/null
/sbin/chkconfig --del ricci
fi
+exit 0
%postun -n ricci
if [ "$1" == "0" ]; then
@@ -279,7 +303,7 @@
if [ "$1" == "1" ]; then
/sbin/service ricci condrestart >&/dev/null
fi
-
+exit 0
next reply other threads:[~2007-08-11 4:23 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-11 4:23 rmccabe [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-09-23 17:34 [Cluster-devel] conga conga.spec.in.in rmccabe
2008-06-13 18:39 rmccabe
2008-06-13 18:38 rmccabe
2008-05-16 17:11 rmccabe
2008-05-16 17:10 rmccabe
2008-05-16 17:08 rmccabe
2008-04-18 3:28 rmccabe
2008-03-19 14:59 rmccabe
2008-01-23 5:20 rmccabe
2008-01-23 4:57 rmccabe
2008-01-22 15:20 rmccabe
2007-10-09 20:57 rmccabe
2007-08-29 1:02 rmccabe
2007-08-27 18:42 rmccabe
2007-08-11 4:22 rmccabe
2007-08-09 22:37 rmccabe
2007-07-16 22:18 rmccabe
2007-06-29 15:58 rmccabe
2007-06-26 21:41 rmccabe
2007-06-18 19:06 rmccabe
2007-04-30 18:34 rmccabe
2007-04-10 19:51 rmccabe
2007-03-30 14:48 kupcevic
2007-03-27 2:20 rmccabe
2007-03-27 2:17 rmccabe
2007-03-20 17:39 rmccabe
2007-03-20 17:38 rmccabe
2007-03-20 17:26 rmccabe
2007-03-20 17:01 kupcevic
2007-03-20 16:38 kupcevic
2007-03-01 1:02 rmccabe
2007-02-16 15:55 rmccabe
2007-02-16 15:54 rmccabe
2007-01-17 16:38 kupcevic
2007-01-10 23:52 rmccabe
2007-01-10 23:51 rmccabe
2006-12-22 18:06 rmccabe
2006-12-22 18:04 rmccabe
2006-12-22 18:01 rmccabe
2006-12-22 18:00 rmccabe
2006-12-14 18:28 rmccabe
2006-12-13 23:58 rmccabe
2006-12-12 13:58 kupcevic
2006-12-12 5:21 rmccabe
2006-12-11 23:52 rmccabe
2006-12-06 23:03 rmccabe
2006-11-16 18:23 rmccabe
2006-11-15 18:07 rmccabe
2006-08-21 23:22 kupcevic
2006-08-18 20:10 kupcevic
2006-08-18 13:59 kupcevic
2006-07-25 21:00 kupcevic
2006-07-17 22:57 kupcevic
2006-07-05 22:08 kupcevic
2006-06-30 22:12 kupcevic
2006-06-28 21:42 kupcevic
2006-06-27 21:46 kupcevic
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=20070811042332.5199.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.