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

ntop.spec

index aeeff129c2d07446f063a00a22d1a5ada5a0cdad..b642929bba2901d85a1578a1afd74cc72b9b5414 100644 (file)
--- a/ntop.spec
+++ b/ntop.spec
@@ -34,7 +34,7 @@ BuildRequires:        libtool
 BuildRequires: ncurses-devel >= 5.2
 BuildRequires: openssl-devel >= 0.9.7d
 BuildRequires: readline-devel >= 4.2
-BuildRequires: rpmbuild(macros) >= 1.159
+BuildRequires: rpmbuild(macros) >= 1.202
 BuildRequires: zlib-devel
 PreReq:                rc-scripts
 Requires(pre): /bin/id
@@ -109,23 +109,8 @@ rm $RPM_BUILD_ROOT%{_libdir}/*.a
 rm -rf $RPM_BUILD_ROOT
 
 %pre
-if [ -n "`/usr/bin/getgid ntop`" ]; then
-       if [ "`/usr/bin/getgid ntop`" != "120" ]; then
-               echo "Error: group ntop doesn't have gid=120. Correct this before installing ntop." 1>&2
-               exit 1
-       fi
-else
-       /usr/sbin/groupadd -g 120 ntop
-fi
-if [ -n "`/bin/id -u ntop 2>/dev/null`" ]; then
-       if [ "`/bin/id -u ntop`" != "120" ]; then
-               echo "Error: user ntop doesn't have uid=120. Correct this before installing ntop." 1>&2
-               exit 1
-       fi
-else
-       /usr/sbin/useradd -u 120 -d /var/lib/ntop -s /bin/false \
-               -c "ntop User" -g ntop ntop 1>&2
-fi
+%groupadd -g 120 ntop
+%useradd -u 120 -d /var/lib/ntop -s /bin/false -c "ntop User" -g ntop ntop
 
 %post
 /sbin/ldconfig
This page took 0.206371 seconds and 4 git commands to generate.