From: Kern Sibbald Date: Sat, 5 Feb 2011 13:08:20 +0000 (+0100) Subject: Implement chgrp on bacula-x.conf if user configs a Dir/SD/FD group X-Git-Tag: Release-7.0.0~1160 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=922cd830e91c003beb9179298bd45a29e62b47df;p=bacula%2Fbacula Implement chgrp on bacula-x.conf if user configs a Dir/SD/FD group --- diff --git a/bacula/src/dird/Makefile.in b/bacula/src/dird/Makefile.in index 6967d2eb5d..b9fcba5da6 100644 --- a/bacula/src/dird/Makefile.in +++ b/bacula/src/dird/Makefile.in @@ -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; \ diff --git a/bacula/src/filed/Makefile.in b/bacula/src/filed/Makefile.in index 1cf73f6ad4..48c5b64882 100644 --- a/bacula/src/filed/Makefile.in +++ b/bacula/src/filed/Makefile.in @@ -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 diff --git a/bacula/src/stored/Makefile.in b/bacula/src/stored/Makefile.in index 01642d8707..cf612a5369 100644 --- a/bacula/src/stored/Makefile.in +++ b/bacula/src/stored/Makefile.in @@ -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