]> git.pld-linux.org Git - packages/Firebird.git/commitdiff
- use %useradd/%groupadd macros
authorElan Ruusamäe <glen@pld-linux.org>
Sun, 1 May 2005 17:31:30 +0000 (17:31 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    Firebird.spec -> 1.26

Firebird.spec

index 5896504354d06b0b79a342ab5aa24501419b345e..f85dcdbe5f402b3580ed81dbfa1a895020d5457a 100644 (file)
@@ -34,6 +34,7 @@ BuildRequires:        automake
 BuildRequires: libtool
 BuildRequires: libstdc++-devel
 BuildRequires: ncurses-devel
+BuildRequires: rpmbuild(macros) >= 1.202
 BuildRequires: unzip
 Requires:      %{name}-lib = %{version}-%{release}
 # official ports are x86, sparc and amd64
@@ -195,47 +196,31 @@ install %{SOURCE6}        $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/firebird
 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
+%groupadd -g 145 firebird
+%useradd -u 145 -d %{ibdir} -s /bin/sh -g firebird -c "Firebird Server" firebird
 
 %if %{with ss}
 %post
 /sbin/chkconfig --add firebird
 if [ -f /var/lock/subsys/firebird ]; then
-        /etc/rc.d/init.d/firebird restart >&2
+       /etc/rc.d/init.d/firebird restart >&2
 else
-        echo "Run \"/etc/rc.d/init.d/firebird start\" to start firebird." >&2
+       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
+       if [ -f /var/lock/subsys/firebird ]; then
+               /etc/rc.d/init.d/firebird stop
+       fi
+       /sbin/chkconfig --del firebird
 fi
 %endif
 
 %postun
 if [ "$1" = "0" ]; then
-        %userremove firebird
-        %groupremove firebird
+       %userremove firebird
+       %groupremove firebird
 fi
 
 %post  lib -p /sbin/ldconfig
This page took 0.062874 seconds and 4 git commands to generate.