Package: freeradius
Version: 1.0.4-2
Severity: wishlist
Tags: patch

Hi!

The freeradius postinst script does a:
 find /var/log/freeradius -exec chown freerad {} \; -exec chgrp freerad {} \;

Which can be slow, especially if there are lots of nas and logs.
This small patch makes one less call to -exec and avoids doing the work
if it's already ok, thus making the process a lot faster:

--- freeradius.postinst.orig    2005-09-06 14:20:33.062435472 +0200
+++ freeradius.postinst 2005-09-06 14:20:53.259365072 +0200
@@ -38,7 +38,7 @@

        find /etc/freeradius -type f -exec chgrp freerad {} \; -exec chmod 640 
{} \;
        find /etc/freeradius -type d -exec chgrp freerad {} \; -exec chmod 2750 
{} \;
-       find /var/log/freeradius -exec chown freerad {} \; -exec chgrp freerad 
{} \;
+       find /var/log/freeradius ! -user freerad -o ! -group freerad -exec 
chown freerad:freerad {} \;

        if [ "$2" = "" ] ; then
                action="start"

Thanks!

Guido


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to