Author: arekm                        Date: Mon Feb 21 21:07:53 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- add init/sysconfig scripts

---- Files affected:
SPECS:
   Firebird.spec (1.22 -> 1.23) 

---- Diffs:

================================================================
Index: SPECS/Firebird.spec
diff -u SPECS/Firebird.spec:1.22 SPECS/Firebird.spec:1.23
--- SPECS/Firebird.spec:1.22    Wed Dec 29 10:36:41 2004
+++ SPECS/Firebird.spec Mon Feb 21 22:07:46 2005
@@ -169,6 +169,48 @@
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%pre
+if [ -n "`/usr/bin/getgid firebird`" ]; then
+        if [ "`/usr/bin/getgid firebird`" != "145" ]; then
+                echo "Error: group firebird doesn't have gid=145. Correct this 
before installing firebird." 1>&2
+                exit 1
+        fi
+else
+        /usr/sbin/groupadd -g 145 firebird
+fi
+if [ -n "`/bin/id -u firebird 2>/dev/null`" ]; then
+        if [ "`/bin/id -u firebird`" != "89" ]; then
+                echo "Error: user firebird doesn't have uid=145. Correct this 
before installing firebird." 1>&2
+                exit 1
+        fi
+else
+        /usr/sbin/useradd -u 145 \
+                        -d %{ibdir} -s /bin/sh -g firebird \
+                        -c "Firebird Server" firebird 1>&2
+fi
+
+%post
+/sbin/chkconfig --add firebird
+if [ -f /var/lock/subsys/firebird ]; then
+        /etc/rc.d/init.d/firebird restart >&2
+else
+        echo "Run \"/etc/rc.d/init.d/firebird start\" to start firebird." >&2
+fi
+
+%preun
+if [ "$1" = "0" ]; then
+        if [ -f /var/lock/subsys/firebird ]; then
+                /etc/rc.d/init.d/firebird stop
+        fi
+        /sbin/chkconfig --del firebird
+fi
+
+%postun
+if [ "$1" = "0" ]; then
+        %userremove firebird
+        %groupremove firebird
+fi
+
 %post  lib -p /sbin/ldconfig
 %postun        lib -p /sbin/ldconfig
 
@@ -187,6 +229,8 @@
 %{ibdir}/security.fdb
 %{ibdir}/aliases.conf
 %{ibdir}/firebird.conf
+%attr(754,root,root) /etc/rc.d/init.d/firebird
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) 
/etc/sysconfig/firebird
 
 %files lib
 %defattr(644,root,root,755)
@@ -222,6 +266,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.23  2005/02/21 21:07:46  arekm
+- add init/sysconfig scripts
+
 Revision 1.22  2004/12/29 09:36:41  hawk
 - updated to 1.5.2.4731
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/Firebird.spec?r1=1.22&r2=1.23&f=u


_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to