From 25d28abb4fa330aefd943e565636b115cd1c20c3 Mon Sep 17 00:00:00 2001 From: morcego Date: Fri, 5 Jul 2002 17:16:19 +0000 Subject: [PATCH 1/1] - Changing delete order for groups and users (users should be first) --- privoxy-rh.spec | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/privoxy-rh.spec b/privoxy-rh.spec index f4a777d7..093fbf3d 100644 --- a/privoxy-rh.spec +++ b/privoxy-rh.spec @@ -1,4 +1,4 @@ -# $Id: privoxy-rh.spec,v 1.33.2.7 2002/07/02 18:16:48 morcego Exp $ +# $Id: privoxy-rh.spec,v 1.33.2.8 2002/07/03 20:46:24 morcego Exp $ # # Written by and Copyright (C) 2001 the SourceForge # Privoxy team. http://www.privoxy.org/ @@ -38,7 +38,7 @@ Name: privoxy # Version and release should be updated acordingly on configure.in and # configure. Otherwise, the package can be build with the wrong value Version: 2.9.15 -Release: 7 +Release: 8 Summary: Privoxy - privacy enhancing proxy License: GPL Source0: http://www.waldherr.org/%{name}/%{name}-%{version}.tar.gz @@ -171,18 +171,18 @@ done # We should do it for the group as well -- morcego # Doing it by brute force. Much cleaner (no more Mr. Nice Guy) -- morcego -# Change the group name. Remove anything left behind. -groupmod -g %{privoxy_gid} -n %{name} %{oldname} > /dev/null 2>&1 ||: -groupmod -g %{privoxy_gid} -n %{name} %{veryoldname} > /dev/null 2>&1 ||: -groupdel %{oldname} > /dev/null 2>&1 ||: -groupdel %{veryoldname} > /dev/null 2>&1 ||: - # Same for username usermod -u %{privoxy_uid} -g %{privoxy_gid} -l %{name} -d %{_sysconfdir}/%{name} -s "" %{oldname} > /dev/null 2>&1 || : usermod -u %{privoxy_uid} -g %{privoxy_gid} -l %{name} -d %{_sysconfdir}/%{name} -s "" %{veryoldname} > /dev/null 2>&1 || : userdel %{oldname} > /dev/null 2>&1 ||: userdel %{veryoldname} > /dev/null 2>&1 ||: +# Change the group name. Remove anything left behind. +groupmod -g %{privoxy_gid} -n %{name} %{oldname} > /dev/null 2>&1 ||: +groupmod -g %{privoxy_gid} -n %{name} %{veryoldname} > /dev/null 2>&1 ||: +groupdel %{oldname} > /dev/null 2>&1 ||: +groupdel %{veryoldname} > /dev/null 2>&1 ||: + # Doublecheck to see if the group exist, and that it has the correct gid /bin/grep -E '^%{name}:' %{_sysconfdir}/group > /dev/null 2>&1 if [ $? -eq 1 ]; then @@ -242,8 +242,8 @@ fi #fi # We only remove it we this is not an upgrade if [ "$1" = "0" ]; then - /bin/grep -E '^%{name}:' %{_sysconfdir}/group > /dev/null && %{_sbindir}/groupdel %{name} || /bin/true id privoxy > /dev/null 2>&1 && %{_sbindir}/userdel privoxy || /bin/true + /bin/grep -E '^%{name}:' %{_sysconfdir}/group > /dev/null && %{_sbindir}/groupdel %{name} || /bin/true fi %clean @@ -332,6 +332,10 @@ fi %{_mandir}/man1/%{name}.* %changelog +* Fri Jul 05 2002 Rodrigo Barbosa ++ privoxy-2.9.15-8 +- Changing delete order for groups and users (users should be first) + * Wed Jul 03 2002 Rodrigo Barbosa + privoxy-2.9.15-7 - Changing sed expression that removed CR from the end of the lines. This @@ -723,6 +727,11 @@ fi additional "-r @" flag. # $Log: privoxy-rh.spec,v $ +# Revision 1.33.2.8 2002/07/03 20:46:24 morcego +# - Changing sed expression that removed CR from the end of the lines. This +# new one removes any control caracter, and should work with older versions +# of sed +# # Revision 1.33.2.7 2002/07/02 18:16:48 morcego # - Fixing defattr values. File and directory modes where swapped # -- 2.39.2