From e5996737a8b676c8e7ae95f23e387f14e60b8f3f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Sun, 1 May 2005 17:31:30 +0000 Subject: [PATCH] - use %useradd/%groupadd macros Changed files: ntop.spec -> 1.65 --- ntop.spec | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/ntop.spec b/ntop.spec index aeeff12..b642929 100644 --- 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 -- 2.44.0