Skip to content

Commit

Permalink
renamed Python plugins example to .py.template
Browse files Browse the repository at this point in the history
to prevent, that users modify them directly,
as these files get replaced on a package update.

Attention: if plugin is activated
(package is installed and Plugin Directory is definied in the configuration file),
bareos-dir and bareos-sd will refuse to work, because of the missing Python code.

Signed-off-by: Marco van Wieringen <marco.van.wieringen@bareos.com>
  • Loading branch information
joergsteffens authored and Marco van Wieringen committed Sep 18, 2014
1 parent 66ef140 commit 9829642
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 9 deletions.
8 changes: 6 additions & 2 deletions src/defaultconfigs/diskonly/bareos-dir.conf.in
@@ -1,6 +1,6 @@
#
# Default Bareos Director configuration file for disk-only backup
# (C) 2013 Bareos GmbH & Co.KG
# (C) 2013-2014 Bareos GmbH & Co.KG
#
# Each configuration item has a reference number that shows
# where this property can be changed in the configuration file.
Expand Down Expand Up @@ -57,8 +57,12 @@ Director { # define myself
# remove comment in next line to load dynamic backends from specified directory
# Backend Directory = @backenddir@

# remove comment in next line to load plugins from specified directory
# remove comment from "Plugin Directory" to load plugins from specified directory.
# if "Plugin Names" is defined, only the specified plugins will be loaded,
# otherwise all director plugins (*-dir.so) from the "Plugin Directory".
#
# Plugin Directory = @plugindir@
# Plugin Names = ""
}

JobDefs {
Expand Down
6 changes: 5 additions & 1 deletion src/defaultconfigs/diskonly/bareos-sd.conf.in
Expand Up @@ -14,8 +14,12 @@ Storage { # definition of myself
Name = @basename@-sd
Maximum Concurrent Jobs = 20

# remove comment in next line to load plugins from specified directory
# remove comment from "Plugin Directory" to load plugins from specified directory.
# if "Plugin Names" is defined, only the specified plugins will be loaded,
# otherwise all storage plugins (*-sd.so) from the "Plugin Directory".
#
# Plugin Directory = @plugindir@
# Plugin Names = ""
}

#
Expand Down
6 changes: 5 additions & 1 deletion src/filed/bareos-fd.conf.in
Expand Up @@ -32,8 +32,12 @@ FileDaemon { # this is me
Name = @basename@-fd
Maximum Concurrent Jobs = 20

# remove comment in next line to load plugins from specified directory
# remove comment from "Plugin Directory" to load plugins from specified directory.
# if "Plugin Names" is defined, only the specified plugins will be loaded,
# otherwise all storage plugins (*-fd.so) from the "Plugin Directory".
#
# Plugin Directory = @plugindir@
# Plugin Names = ""

# if compatible is set to yes, we are compatible with bacula
# if you want to use new bareos features, please set
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/dird/Makefile.in
Expand Up @@ -51,7 +51,7 @@ plugtest: Makefile dir_plugins.c \

install: all
$(MKDIR) $(DESTDIR)$(plugindir)
$(CP) *.py $(DESTDIR)$(plugindir)
$(CP) *.py *.py.template $(DESTDIR)$(plugindir)
@for plugin in $(BUILD_PLUGINS); do \
$(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) $$plugin $(DESTDIR)$(plugindir); \
$(RMF) $(DESTDIR)$(plugindir)/$$plugin; \
Expand Down
Expand Up @@ -29,4 +29,3 @@ def handle_plugin_event(context, event):
DebugMessage(context, 100, "bDirEventJobRun event triggered\n");

return bRCs['bRC_OK'];

2 changes: 1 addition & 1 deletion src/plugins/filed/Makefile.in
Expand Up @@ -63,7 +63,7 @@ plugtest: Makefile fd_plugins.c fileset.c \

install: all
$(MKDIR) $(DESTDIR)$(plugindir)
$(CP) *.py $(DESTDIR)$(plugindir)
$(CP) *.py *.py.template $(DESTDIR)$(plugindir)
$(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) bpipe-fd.la $(DESTDIR)$(plugindir)
$(RMF) $(DESTDIR)$(plugindir)/bpipe-fd.la
@for plugin in $(BUILD_PLUGINS); do \
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/plugins/stored/Makefile.in
Expand Up @@ -71,7 +71,7 @@ plugtest: Makefile sd_plugins.c \

install: all
$(MKDIR) $(DESTDIR)$(plugindir)
$(CP) *.py $(DESTDIR)$(plugindir)
$(CP) *.py *.py.template $(DESTDIR)$(plugindir)
@for plugin in $(BUILD_PLUGINS); do \
$(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) $$plugin $(DESTDIR)$(plugindir); \
$(RMF) $(DESTDIR)$(plugindir)/$$plugin; \
Expand Down
Expand Up @@ -21,4 +21,3 @@ def handle_plugin_event(context, event):
DebugMessage(context, 100, "Job " + jobname + " stopped\n");

return bRCs['bRC_OK'];

0 comments on commit 9829642

Please sign in to comment.