If RADMIN and RGROUP are defined, create new target,
authoraland <aland>
Mon, 12 May 2008 13:00:24 +0000 (13:00 +0000)
committeraland <aland>
Mon, 12 May 2008 13:00:24 +0000 (13:00 +0000)
install-chown that sets up the correct owners and permissions
of etc/raddb and var/log/radius

Makefile

index 24d12d6..c2119a9 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -67,6 +67,22 @@ install:
        done
        $(LIBTOOL) --finish $(R)$(libdir)
 
+ifneq ($(RADMIN),)
+ifneq ($(RGROUP),)
+.PHONY: install-chown
+install-chown:
+       chown -R $(RADMIN)   $(R)$(raddbdir)
+       chgrp -R $(RGROUP)   $(R)$(raddbdir)
+       chmod u=rwx,g=rx,o=  `find $(R)$(raddbdir) -type d -print`
+       chmod u=rw,g=r,o=    `find $(R)$(raddbdir) -type f -print`
+       chown -R $(RADMIN)   $(R)$(logdir)
+       chgrp -R $(RGROUP)   $(R)$(logdir)
+       chmod u=rwx,g=rwx,o= `find $(R)$(logdir) -type d -print`
+       chmod g+s            `find $(R)$(logdir) -type d -print`
+       chmod u=rw,g=rw,o=   `find $(R)$(logdir) -type f -print`
+endif
+endif
+
 common:
        @for dir in $(SUBDIRS); do \
                echo "Making $(WHAT_TO_MAKE) in $$dir..."; \