]> git.pld-linux.org Git - packages/freeradius.git/commitdiff
- revert user changes
authorpascalek <pascalek@pld-linux.org>
Sat, 17 May 2003 07:02:39 +0000 (07:02 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    freeradius.spec -> 1.21

freeradius.spec

index 4e62b183556c8c2f5fed500e8e48bf6681c86c2a..8bc889b921b6af8d1c4c97bcbe3a209a76f1ef95 100644 (file)
@@ -16,8 +16,7 @@ Source1:      %{name}.logrotate
 Source2:       %{name}.init
 Source3:       %{name}.pam
 URL:           http://www.freeradius.org/
-Requires(post,preun):  /sbin/chkconfig
-Requires(pre): user-radius
+Prereq:                /sbin/chkconfig
 Requires:      libtool
 BuildRequires: gdbm-devel
 BuildRequires: libltdl-devel
@@ -89,6 +88,16 @@ install %{SOURCE3}   $RPM_BUILD_ROOT/etc/pam.d/radius
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%pre
+if [ -n "`id -u radius 2>/dev/null`" ]; then
+        if [ "`id -u radius`" != "29" ]; then
+                echo "Error: user radius doesn't have uid=29. Correct this before installing radius server." 1>&2
+                exit 1
+        fi
+else
+        /usr/sbin/useradd -u 29 -d %{_localstatedir} -s /bin/false -M -r -c "%{name}" -g nobody radius 1>&2
+fi
+
 %post
 /sbin/chkconfig --add %{name}
 if [ -f /var/lock/subsys/%{name} ]; then
@@ -105,6 +114,11 @@ if [ "$1" = "0" ]; then
         /sbin/chkconfig --del %{name}
 fi
 
+%postun
+if [ "$1" = "0" ]; then
+        /usr/sbin/userdel %{name}
+fi
+
 %files
 %defattr(644,root,root,755)
 %doc doc/*
This page took 0.033159 seconds and 4 git commands to generate.