Skip to content

Commit

Permalink
store Debian config templates in directory configured by --with-confi…
Browse files Browse the repository at this point in the history
…gtemplatedir

Signed-off-by: Marco van Wieringen <marco.van.wieringen@bareos.com>
  • Loading branch information
joergsteffens authored and Marco van Wieringen committed Feb 17, 2015
1 parent 50a30ec commit 82f459c
Show file tree
Hide file tree
Showing 20 changed files with 42 additions and 20 deletions.
27 changes: 27 additions & 0 deletions autoconf/configure.in
Expand Up @@ -1459,6 +1459,22 @@ AC_ARG_WITH(plugindir,

AC_SUBST(plugindir)

# ------------------------------------------
# Where to place configtemplatedir (configuration template files)
# ------------------------------------------
configtemplatedir=`eval echo ${libdir}`
AC_ARG_WITH(configtemplatedir,
AC_HELP_STRING([--with-configtemplatedir=PATH], [specify path of Bareos configuration templates directory (Debian only)]),
[
if test "x$withval" != "xno" ; then
configtemplatedir=$withval
fi
]
)

AC_SUBST(configtemplatedir)


dnl ------------------------------------------
dnl Where to send dump email
dnl ------------------------------------------
Expand Down Expand Up @@ -3916,8 +3932,11 @@ debian|ubuntu|univention)
DEBIAN_CONTROL_UNIVENTION_BAREOS_SCHEMA=/dev/null
PFILES="${PFILES} ${DEBIAN_CONTROL} \
debian/bareos-bat.install \
debian/bareos-bat.postinst \
debian/bareos-bconsole.install \
debian/bareos-bconsole.postinst \
debian/bareos-common.install \
debian/bareos-common.postinst \
debian/bareos-common.preinst \
debian/bareos-database-common.config \
debian/bareos-database-common.install \
Expand All @@ -3930,19 +3949,25 @@ debian|ubuntu|univention)
debian/bareos-director-python-plugin.install \
debian/bareos-director.bareos-dir.init \
debian/bareos-director.install \
debian/bareos-director.postinst \
debian/bareos-director.preinst \
debian/bareos-filedaemon-python-plugin.install \
debian/bareos-filedaemon.bareos-fd.init \
debian/bareos-filedaemon.install \
debian/bareos-filedaemon.postinst \
debian/bareos-filedaemon.preinst \
debian/bareos-storage-fifo.postinst \
debian/bareos-storage-fifo.install \
debian/bareos-storage-python-plugin.install \
debian/bareos-storage-tape.postinst \
debian/bareos-storage-tape.install \
debian/bareos-storage.bareos-sd.init \
debian/bareos-storage.install \
debian/bareos-storage.postinst \
debian/bareos-storage.preinst \
debian/bareos-tools.install \
debian/bareos-traymonitor.install \
debian/bareos-traymonitor.postinst \
platforms/debian/Makefile \
platforms/debian/set_dbconfig_vars.sh"
case "$DISTNAME" in
Expand All @@ -3955,7 +3980,9 @@ debian|ubuntu|univention)
DEBIAN_CONTROL_UNIVENTION_BAREOS_SCHEMA=./debian/control.univention-bareos-schema
PFILES="${PFILES} \
debian/univention-bareos-schema.install \
debian/univention-bareos-schema.postinst \
debian/univention-bareos.install \
debian/univention-bareos.postinst \
platforms/univention/Makefile"
;;
esac
Expand Down
1 change: 1 addition & 0 deletions debian/bareos-bat.install.in
@@ -1,3 +1,4 @@
@sysconfdir@/bat.conf @configtemplatedir@
/usr/bin/bat
/usr/share/pixmaps/bat.png
/usr/share/pixmaps/bat.svg
Expand Down
Expand Up @@ -20,7 +20,7 @@ set -e
daemon_user=bareos
daemon_group=bareos

DEFCONFIGDIR="/usr/share/bareos-common/defconfig"
DEFCONFIGDIR="@configtemplatedir@"
CONFIG="bat.conf"
TARGET="/etc/bareos/${CONFIG}"

Expand Down
1 change: 1 addition & 0 deletions debian/bareos-bconsole.install.in
@@ -1,4 +1,5 @@
@scriptdir@/bconsole
@sysconfdir@/bconsole.conf @configtemplatedir@
/usr/bin/bconsole
/usr/sbin/bconsole
/usr/share/man/man1/bconsole.1.gz
Expand Up @@ -20,7 +20,7 @@ set -e
daemon_user=bareos
daemon_group=bareos

DEFCONFIGDIR="/usr/share/bareos-common/defconfig"
DEFCONFIGDIR="@configtemplatedir@"
CONFIG="bconsole.conf"
TARGET="/etc/bareos/${CONFIG}"

Expand Down
6 changes: 0 additions & 6 deletions debian/bareos-common.install.in
Expand Up @@ -14,9 +14,3 @@
/usr/share/man/man1/bsmtp.1.gz
/usr/share/man/man8/btraceback.8.gz
/var/lib/bareos/
/etc/bareos/bat.conf usr/share/bareos-common/defconfig
/etc/bareos/bconsole.conf usr/share/bareos-common/defconfig
/etc/bareos/bareos-dir.conf usr/share/bareos-common/defconfig
/etc/bareos/bareos-fd.conf usr/share/bareos-common/defconfig
/etc/bareos/bareos-sd.conf usr/share/bareos-common/defconfig
/etc/bareos/tray-monitor.conf usr/share/bareos-common/defconfig
Expand Up @@ -22,7 +22,6 @@ daemon_group=bareos

permissions()
{
chown ${daemon_user}:${daemon_group} /etc/bareos/bareos-dir.d
chown ${daemon_user}:${daemon_group} /var/lib/bareos/
chown ${daemon_user}:${daemon_group} /var/log/bareos/
}
Expand Down
1 change: 1 addition & 0 deletions debian/bareos-director.install.in
Expand Up @@ -3,6 +3,7 @@
@scriptdir@/make_catalog_backup
@scriptdir@/make_catalog_backup.pl
@scriptdir@/query.sql
@sysconfdir@/bareos-dir.conf @configtemplatedir@
/usr/sbin/bareos-dir
/usr/share/man/man8/bareos-dir.8.gz
/usr/share/man/man8/bareos.8.gz
Expand Up @@ -20,19 +20,15 @@ set -e
daemon_user=bareos
daemon_group=bareos

director_daemon_user=$daemon_user
#storage_daemon_user=$daemon_user
#file_daemon_user=root
#storage_daemon_group=$daemon_group

DEFCONFIGDIR="/usr/share/bareos-common/defconfig"
DEFCONFIGDIR="@configtemplatedir@"
CONFIG="bareos-dir.conf"
TARGET="/etc/bareos/${CONFIG}"


permissions()
{
chown ${director_daemon_user}:${daemon_group} $TARGET
chown ${daemon_user}:${daemon_group} /etc/bareos/bareos-dir.d
chown ${daemon_user}:${daemon_group} $TARGET
chmod 640 $TARGET
}

Expand Down
1 change: 1 addition & 0 deletions debian/bareos-filedaemon.install.in
@@ -1,2 +1,3 @@
@sysconfdir@/bareos-fd.conf @configtemplatedir@
/usr/sbin/bareos-fd
/usr/share/man/man8/bareos-fd.8.gz
Expand Up @@ -25,7 +25,7 @@ daemon_group=bareos
file_daemon_user=root
#storage_daemon_group=$daemon_group

DEFCONFIGDIR="/usr/share/bareos-common/defconfig"
DEFCONFIGDIR="@configtemplatedir@"
CONFIG="bareos-fd.conf"
TARGET="/etc/bareos/${CONFIG}"

Expand Down
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions debian/bareos-storage.install.in
@@ -1,6 +1,7 @@
/usr/sbin/bscrypto
@plugindir@/scsicrypto-sd.so
@scriptdir@/disk-changer
@sysconfdir@/bareos-sd.conf @configtemplatedir@
/usr/sbin/bareos-sd
/usr/share/man/man8/bscrypto.8.gz
/usr/share/man/man8/bareos-sd.8.gz
Expand Up @@ -25,7 +25,7 @@ storage_daemon_user=$daemon_user
#file_daemon_user=root
storage_daemon_group=$daemon_group

DEFCONFIGDIR="/usr/share/bareos-common/defconfig"
DEFCONFIGDIR="@configtemplatedir@"
CONFIG="bareos-sd.conf"
TARGET="/etc/bareos/${CONFIG}"

Expand Down
1 change: 1 addition & 0 deletions debian/bareos-traymonitor.install.in
@@ -1,4 +1,5 @@
/etc/xdg/autostart/bareos-tray-monitor.desktop
@sysconfdir@/tray-monitor.conf @configtemplatedir@
/usr/bin/bareos-tray-monitor
/usr/share/man/man1/bareos-tray-monitor.1.gz
/usr/share/applications/bareos-tray-monitor.desktop
Expand Down
Expand Up @@ -20,7 +20,7 @@ set -e
daemon_user=bareos
daemon_group=bareos

DEFCONFIGDIR="/usr/share/bareos-common/defconfig"
DEFCONFIGDIR="@configtemplatedir@"
CONFIG="tray-monitor.conf"
TARGET="/etc/bareos/${CONFIG}"

Expand Down
2 changes: 1 addition & 1 deletion debian/rules
Expand Up @@ -23,14 +23,14 @@ DIRECTOR_DAEMON_USER = $(DAEMON_USER)
STORAGE_DAEMON_USER = $(DAEMON_USER)
FILE_DAEMON_USER = root
STORAGE_DAEMON_GROUP = $(DAEMON_GROUP)
WORKING_DIR = /var/lib/bareos

define CONFIGURE_COMMON
--with-sbin-perm=755 \
--libdir=/usr/lib/bareos \
--sysconfdir=/etc/bareos \
--with-archivedir=/var/lib/bareos/storage \
--with-backenddir=/usr/lib/bareos/backends \
--with-configtemplatedir=/usr/lib/bareos/defaultconfigs \
--with-scriptdir=/usr/lib/bareos/scripts \
--with-plugindir=/usr/lib/bareos/plugins \
--with-working-dir=/var/lib/bareos \
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 82f459c

Please sign in to comment.