Update of /cvsroot/monetdb/MonetDB5
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv4333

Modified Files:
        MonetDB-server.spec.in 
Log Message:
Prepare for init script (i.e. document what's required).


Index: MonetDB-server.spec.in
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/MonetDB-server.spec.in,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- MonetDB-server.spec.in      5 Sep 2007 17:06:16 -0000       1.24
+++ MonetDB-server.spec.in      7 Sep 2007 09:33:23 -0000       1.25
@@ -28,10 +28,17 @@
 BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
 
 Requires(pre): shadow-utils
-# Requires(post): chkconfig
 BuildRequires: python
 BuildRequires: pcre-devel
 
+# when we want MonetDB to run as system daemon, we need this
+# also see the scriptlets below
+# the init script should implement start, stop, restart, condrestart, status
+# Requires(post): /sbin/chkconfig
+# Requires(preun): /sbin/chkconfig
+# Requires(preun): /sbin/service
+# Requires(postun): /sbin/service
+
 %{!?_with_python: %{!?_without_python: %define _with_python --with-python}}
 
 %define builddoc 0
@@ -113,12 +120,26 @@
     -c "MonetDB Server" monetdb
 exit 0
 
-%post -p /sbin/ldconfig
+%post
+/sbin/ldconfig
 
-#create monetdb init script
-#/sbin/chkconfig --add monetdb
+# when we want MonetDB to run as system daemon, we need this
+# # This adds the proper /etc/rc*.d links for the script
+# /sbin/chkconfig --add monetdb5
 
-%postun -p /sbin/ldconfig
+# %preun
+# if [ $1 = 0 ]; then
+#      /sbin/service monetdb5 stop >/dev/null 2>&1
+#      /sbin/chkconfig --del monetdb5
+# fi
+
+%postun
+/sbin/ldconfig
+
+# when we want MonetDB to run as system daemon, we need this
+# if [ "$1" -ge "1" ]; then
+#      /sbin/service monetdb5 condrestart >/dev/null 2>&1 || :
+# fi
 
 %clean
 rm -fr $RPM_BUILD_ROOT


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins

Reply via email to