]> git.pld-linux.org Git - packages/zabbix.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:
    zabbix.spec -> 1.21

zabbix.spec

index dab52d6806f39bc4f9cad19291e3a340f88d6d79..e2bd8917cc0eff95e1b6f53869a03d89ff44b1db 100644 (file)
@@ -19,7 +19,7 @@ URL:          http://zabbix.sourceforge.net/
 %{?with_pgsql:BuildRequires:   postgresql-devel}
 BuildRequires: net-snmp-devel
 BuildRequires: openssl-devel >= 0.9.7d
-BuildRequires: rpmbuild(macros) >= 1.159
+BuildRequires: rpmbuild(macros) >= 1.202
 Requires(pre): /bin/id
 Requires(pre): /usr/bin/getgid
 Requires(pre): /usr/sbin/groupadd
@@ -177,22 +177,8 @@ install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/zabbix-trapper
 rm -rf $RPM_BUILD_ROOT
 
 %pre
-if [ -n "`/usr/bin/getgid zabbix`" ]; then
-       if [ "`/usr/bin/getgid zabbix`" != "111" ]; then
-               echo "Error: group zabbix doesn't have gid=111. Correct this before installing zabbix." 1>&2
-               exit 1
-       fi
-else
-       /usr/sbin/groupadd -g 111 zabbix
-fi
-if [ -n "`/bin/id -u zabbix 2>/dev/null`" ]; then
-       if [ "`/bin/id -u zabbix`" != "111" ]; then
-               echo "Error: user zabbix doesn't have uid=111. Correct this before installing zabbix." 1>&2
-               exit 1
-       fi
-else
-       /usr/sbin/useradd -d / -u 111 -g zabbix -c "Zabbix User" -s /bin/false zabbix
-fi
+%groupadd -g 111 zabbix
+%useradd -d / -u 111 -g zabbix -c "Zabbix User" -s /bin/false zabbix
 
 %postun
 if [ "$1" = "0" ]; then
This page took 0.151295 seconds and 4 git commands to generate.