]> git.sur5r.net Git - bacula/bacula/commitdiff
Implement chgrp on bacula-x.conf if user configs a Dir/SD/FD group
authorKern Sibbald <kern@sibbald.com>
Sat, 5 Feb 2011 13:08:20 +0000 (14:08 +0100)
committerKern Sibbald <kern@sibbald.com>
Sat, 20 Apr 2013 12:39:59 +0000 (14:39 +0200)
bacula/src/dird/Makefile.in
bacula/src/filed/Makefile.in
bacula/src/stored/Makefile.in

index 6967d2eb5dcf409e71f0449b8bf482041e3b4f20..b9fcba5da60d28b40ca526026a709fe80dffe395 100644 (file)
@@ -1,7 +1,6 @@
 #
 #  Bacula Director Makefile
 #
-#  Version $Id$
 #  
 @MCOMMON@
 
@@ -9,6 +8,8 @@ srcdir =        .
 VPATH =        .
 .PATH:         .
 
+dir_group=@dir_group@
+
 # one up
 basedir = ..
 # top dir
@@ -64,16 +65,16 @@ all: Makefile bacula-dir @STATIC_DIR@
        @echo " "
 
 bacula-dir: Makefile $(SVROBJS) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) \
-            ../lib/libbacpy$(DEFAULT_ARCHIVE_TYPE) ../cats/libbacsql$(DEFAULT_ARCHIVE_TYPE) \
-            ../cats/libbaccats$(DEFAULT_ARCHIVE_TYPE) ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE)
+           ../lib/libbacpy$(DEFAULT_ARCHIVE_TYPE) ../cats/libbacsql$(DEFAULT_ARCHIVE_TYPE) \
+           ../cats/libbaccats$(DEFAULT_ARCHIVE_TYPE) ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE)
        @echo "Linking $@ ..."
        $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -L../lib -L../cats -L../findlib -o $@ $(SVROBJS) \
              -lbacfind -lbacsql -lbaccats -lbacpy -lbaccfg -lbac -lm $(PYTHON_LIBS) $(DLIB) $(DB_LIBS) $(LIBS) \
              $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(CAP_LIBS)
 
 static-bacula-dir:  Makefile $(SVROBJS) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) \
-                   ../lib/libbacpy$(DEFAULT_ARCHIVE_TYPE) ../cats/libbacsql$(DEFAULT_ARCHIVE_TYPE) \
-                   ../cats/libbaccats$(DEFAULT_ARCHIVE_TYPE) ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE)
+                  ../lib/libbacpy$(DEFAULT_ARCHIVE_TYPE) ../cats/libbacsql$(DEFAULT_ARCHIVE_TYPE) \
+                  ../cats/libbaccats$(DEFAULT_ARCHIVE_TYPE) ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE)
        $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -static -L../lib -L../cats -L../findlib -o $@ $(SVROBJS) \
              -lbacfind -lbacsql -lbaccats -lbacpy -lbaccfg -lbac -lm $(PYTHON_LIBS) $(DLIB) $(DB_LIBS) $(LIBS) \
              $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(CAP_LIBS)
@@ -112,6 +113,9 @@ install: all
           fi; \
           echo "${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
           ${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
+          @if test "x$dir_group" != "x"; then \
+             chgrp -f $dir_group ${DESTDIR}${sysconfdir}/$$destconf \
+          fi
        @if  test -f ${DESTDIR}${scriptdir}/query.sql; then \
           echo "  ==> Saving existing query.sql to query.sql.old"; \
           $(MV) -f ${DESTDIR}${scriptdir}/query.sql ${DESTDIR}${scriptdir}/query.sql.old; \
index 1cf73f6ad4c59855e0352e7702ea77d1c6cdee0f..48c5b6488283deededa811df9cac2779c5849ef0 100644 (file)
@@ -1,7 +1,6 @@
 #
 # Bacula Makefile for the File daemon
 #
-#  Version $Id$
 #
 
 @MCOMMON@
@@ -10,6 +9,8 @@ srcdir =       .
 VPATH =        .
 .PATH:         .
 
+fd_group=@fd_group@
+
 # one up
 basedir = ..
 # top dir
@@ -145,6 +146,9 @@ install: all
        fi; \
        echo "${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
        ${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
+       @if test "x$fd_group" != "x"; then \
+          chgrp -f $fd_group ${DESTDIR}${sysconfdir}/$$destconf \
+       fi
        @if test -f static-bacula-fd; then \
           $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) static-bacula-fd $(DESTDIR)$(sbindir)/static-bacula-fd; \
        fi
index 01642d87072873c2f80947cd5e64703603e7163b..cf612a5369b1cb54010040a7eea03712037f2d72 100644 (file)
@@ -1,10 +1,12 @@
-# $Id$
+#
 @MCOMMON@
 
 srcdir =       .
 VPATH =        .
 .PATH:         .
 
+sd_group=@sd_group@
+
 # one up
 basedir = ..
 # top dir
@@ -135,7 +137,7 @@ bscan.o: bscan.c
           -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
 
 bscan: Makefile $(SCNOBJS) ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) \
-        ../cats/libbacsql$(DEFAULT_ARCHIVE_TYPE) ../cats/libbaccats$(DEFAULT_ARCHIVE_TYPE)
+       ../cats/libbacsql$(DEFAULT_ARCHIVE_TYPE) ../cats/libbaccats$(DEFAULT_ARCHIVE_TYPE)
        $(LIBTOOL_LINK) $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L../lib -L../cats -L../findlib -o $@ $(SCNOBJS) \
           -lbacsql -lbaccats $(DB_LIBS) $(ZLIBS) -lbacfind -lbaccfg -lbac -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
 
@@ -168,6 +170,9 @@ install: all
        fi; \
        echo "${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
        ${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
+       @if test "x$sd_group" != "x"; then \
+          chgrp -f $sd_group ${DESTDIR}${sysconfdir}/$$destconf \
+       fi
        @if test -f static-bacula-sd; then \
           $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) static-bacula-sd $(DESTDIR)$(sbindir)/static-bacula-sd; \
        fi