]> git.pld-linux.org Git - packages/postgresql.git/commitdiff
- reverting last change: removing new macros from %p{re,ost}{,un}
authorsaq <saq@pld-linux.org>
Thu, 26 Jul 2001 05:42:22 +0000 (05:42 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    postgresql.spec -> 1.104

postgresql.spec

index 5f92ec8ce3ec9483bebf0eab1a4057e1acf8bfc6..d1b1e5d1cd3ba9e63f51d228bd8a5f273da02440 100644 (file)
@@ -618,19 +618,27 @@ gzip -9nf doc/FAQ doc/README* COPYRIGHT README HISTORY doc/bug.template \
        src/interfaces/odbc/notice.txt
 
 %pre
-GROUP=postgres; GID=88; %groupadd
-USER=postgres; UID=88; HOMEDIR=/var/lib/pgsql; SHELL=/bin/sh
-COMMENT="PostgreSQL Server"; %useradd
+getgid postgres >/dev/null 2>&1 || /usr/sbin/groupadd -g 88 -r -f postgres
+id postgres >/dev/null 2>&1 || /usr/sbin/useradd -M -o -r -u 88 \
+       -d /var/lib/pgsql -s /bin/sh -g postgres \
+       -c "PostgreSQL Server" postgres
 
 %post
-%chkconfig_add
+/sbin/chkconfig --add postgresql
 
-%preun
-%chkconfig_del
+if [ -r /var/lock/subsys/postmaster ]; then
+       /etc/rc.d/init.d/postgresql restart >&2
+else
+       echo "Run \"/etc/rc.d/init.d/postgresql start\" to start postgresql server."
+fi
 
-%postun
-USER=postgres; %userdel
-GROUP=postgres; %groupdel
+%preun
+if [ "$1" = "0" ]; then
+       if [ -f /var/lock/subsys/postmaster ]; then
+               /etc/rc.d/init.d/postgresql stop
+       fi
+       /sbin/chkconfig --del postgresql
+fi
 
 %post   libs -p /sbin/ldconfig
 %postun libs -p /sbin/ldconfig
This page took 0.101069 seconds and 4 git commands to generate.