platforms/darwin/Makefile"
;;
debian)
+ if `grep -q ubuntu /etc/apt/sources.list`; then
+ DISTNAME="ubuntu"
+ fi
DISTVER=`cat /etc/debian_version`
+ if test -f /etc/lsb-release ; then
+ . /etc/lsb-release
+ if test "x$DISTRIB_ID" != "x" ; then
+ DISTNAME=$DISTRIB_ID
+ fi
+ if test "x$DISTRIB_RELEASE" != "x" ; then
+ DISTVER=$DISTRIB_RELEASE
+ fi
+ fi
+ if test "$DISTNAME" = "Ubuntu" ; then
+ DISTNAME="ubuntu"
+ fi
TAPEDRIVE="/dev/nst0"
PSCMD="ps -e -o pid,command"
- PFILES="${PFILES} \
- platforms/debian/Makefile \
- platforms/debian/bacula-fd \
- platforms/debian/bacula-sd \
- platforms/debian/bacula-dir"
+ if test "$DISTNAME" = "ubuntu" ; then
+ PFILES="${PFILES} \
+ platforms/ubuntu/Makefile \
+ platforms/ubuntu/bacula-fd \
+ platforms/ubuntu/bacula-sd \
+ platforms/ubuntu/bacula-dir"
+ else
+ PFILES="${PFILES} \
+ platforms/debian/Makefile \
+ platforms/debian/bacula-fd \
+ platforms/debian/bacula-sd \
+ platforms/debian/bacula-dir"
+ fi
;;
freebsd)
DISTVER=`uname -a |awk '{print $3}'`
cd ..
c=updatedb
-chmod 755 $c/update_mysql_tables_10_to_11 $c/update_sqlite3_tables_10_to_11
-chmod 755 $c/update_postgresql_tables_10_to_11 $c/update_sqlite_tables_10_to_11
+chmod 755 $c/update_mysql_tables_10_to_11 $c/update_sqlite3_tables_10_to_11
+chmod 755 $c/update_postgresql_tables_10_to_11 $c/update_sqlite_tables_10_to_11
c=src/cats
platforms/darwin/Makefile"
;;
debian)
+ if `grep -q ubuntu /etc/apt/sources.list`; then
+ DISTNAME="ubuntu"
+ fi
DISTVER=`cat /etc/debian_version`
+ if test -f /etc/lsb-release ; then
+ . /etc/lsb-release
+ if test "x$DISTRIB_ID" != "x" ; then
+ DISTNAME=$DISTRIB_ID
+ fi
+ if test "x$DISTRIB_RELEASE" != "x" ; then
+ DISTVER=$DISTRIB_RELEASE
+ fi
+ fi
+ if test "$DISTNAME" = "Ubuntu" ; then
+ DISTNAME="ubuntu"
+ fi
TAPEDRIVE="/dev/nst0"
PSCMD="ps -e -o pid,command"
- PFILES="${PFILES} \
- platforms/debian/Makefile \
- platforms/debian/bacula-fd \
- platforms/debian/bacula-sd \
- platforms/debian/bacula-dir"
+ if test "$DISTNAME" = "ubuntu" ; then
+ PFILES="${PFILES} \
+ platforms/ubuntu/Makefile \
+ platforms/ubuntu/bacula-fd \
+ platforms/ubuntu/bacula-sd \
+ platforms/ubuntu/bacula-dir"
+ else
+ PFILES="${PFILES} \
+ platforms/debian/Makefile \
+ platforms/debian/bacula-fd \
+ platforms/debian/bacula-sd \
+ platforms/debian/bacula-dir"
+ fi
;;
freebsd)
DISTVER=`uname -a |awk '{print $3}'`
exit 1
fi
-ac_config_files="$ac_config_files autoconf/Make.common Makefile manpages/Makefile scripts/startmysql scripts/stopmysql scripts/btraceback scripts/startit scripts/stopit scripts/bconsole scripts/gconsole scripts/bacula scripts/bacula-ctl-dir scripts/bacula-ctl-fd scripts/bacula-ctl-sd scripts/devel_bacula scripts/Makefile scripts/logrotate scripts/bacula.desktop.gnome1 scripts/bacula.desktop.gnome2 scripts/bacula.desktop.gnome1.consolehelper scripts/bacula.desktop.gnome2.consolehelper scripts/bacula.desktop.gnome1.xsu scripts/bacula.desktop.gnome2.xsu scripts/bgnome-console.console_apps scripts/mtx-changer scripts/disk-changer scripts/dvd-handler scripts/dvd-simulator scripts/bacula-tray-monitor.desktop scripts/logwatch/Makefile scripts/logwatch/logfile.bacula.conf scripts/wxconsole.console_apps scripts/wxconsole.desktop.consolehelper scripts/wxconsole.desktop.xsu scripts/bat.desktop scripts/bat.desktop.xsu scripts/bat.desktop.consolehelper scripts/bat.console_apps src/Makefile src/host.h src/console/Makefile src/console/bconsole.conf src/gnome2-console/Makefile src/gnome2-console/bgnome-console.conf src/qt-console/bat.conf src/qt-console/bat.pro src/qt-console/install_conf_file src/wx-console/Makefile src/wx-console/bwx-console.conf src/tray-monitor/Makefile src/tray-monitor/tray-monitor.conf src/dird/Makefile src/dird/bacula-dir.conf src/lib/Makefile src/stored/Makefile src/stored/bacula-sd.conf src/filed/Makefile src/filed/bacula-fd.conf src/cats/Makefile src/cats/make_catalog_backup src/cats/delete_catalog_backup src/cats/create_postgresql_database src/cats/update_postgresql_tables src/cats/make_postgresql_tables src/cats/grant_postgresql_privileges src/cats/drop_postgresql_tables src/cats/drop_postgresql_database src/cats/create_mysql_database src/cats/update_mysql_tables src/cats/make_mysql_tables src/cats/grant_mysql_privileges src/cats/drop_mysql_tables src/cats/drop_mysql_database src/cats/create_sqlite_database src/cats/update_sqlite_tables src/cats/make_sqlite_tables src/cats/grant_sqlite_privileges src/cats/drop_sqlite_tables src/cats/drop_sqlite_database src/cats/create_sqlite3_database src/cats/update_sqlite3_tables src/cats/make_sqlite3_tables src/cats/grant_sqlite3_privileges src/cats/drop_sqlite3_tables src/cats/drop_sqlite3_database src/cats/sqlite src/cats/mysql src/cats/create_bdb_database src/cats/update_bdb_tables src/cats/make_bdb_tables src/cats/grant_bdb_privileges src/cats/drop_bdb_tables src/cats/drop_bdb_database src/cats/create_bacula_database src/cats/update_bacula_tables src/cats/grant_bacula_privileges src/cats/make_bacula_tables src/cats/drop_bacula_tables src/cats/drop_bacula_database src/findlib/Makefile src/tools/Makefile po/Makefile.in $PFILES"
+ac_config_files="$ac_config_files autoconf/Make.common Makefile manpages/Makefile scripts/startmysql scripts/stopmysql scripts/btraceback scripts/startit scripts/stopit scripts/bconsole scripts/gconsole scripts/bacula scripts/bacula-ctl-dir scripts/bacula-ctl-fd scripts/bacula-ctl-sd scripts/devel_bacula scripts/Makefile scripts/logrotate scripts/bacula.desktop.gnome1 scripts/bacula.desktop.gnome2 scripts/bacula.desktop.gnome1.consolehelper scripts/bacula.desktop.gnome2.consolehelper scripts/bacula.desktop.gnome1.xsu scripts/bacula.desktop.gnome2.xsu scripts/bgnome-console.console_apps scripts/mtx-changer scripts/disk-changer scripts/dvd-handler scripts/dvd-simulator scripts/bacula-tray-monitor.desktop scripts/logwatch/Makefile scripts/logwatch/logfile.bacula.conf scripts/wxconsole.console_apps scripts/wxconsole.desktop.consolehelper scripts/wxconsole.desktop.xsu scripts/bat.desktop scripts/bat.desktop.xsu scripts/bat.desktop.consolehelper scripts/bat.console_apps src/Makefile src/host.h src/console/Makefile src/console/bconsole.conf src/gnome2-console/Makefile src/gnome2-console/bgnome-console.conf src/qt-console/bat.conf src/qt-console/bat.pro src/qt-console/install_conf_file src/wx-console/Makefile src/wx-console/bwx-console.conf src/tray-monitor/Makefile src/tray-monitor/tray-monitor.conf src/dird/Makefile src/dird/bacula-dir.conf src/lib/Makefile src/stored/Makefile src/stored/bacula-sd.conf src/filed/Makefile src/filed/bacula-fd.conf src/cats/Makefile src/cats/make_catalog_backup src/cats/delete_catalog_backup src/cats/create_postgresql_database src/cats/update_postgresql_tables src/cats/make_postgresql_tables src/cats/grant_postgresql_privileges src/cats/drop_postgresql_tables src/cats/drop_postgresql_database src/cats/create_mysql_database src/cats/update_mysql_tables src/cats/make_mysql_tables src/cats/grant_mysql_privileges src/cats/drop_mysql_tables src/cats/drop_mysql_database src/cats/create_sqlite_database src/cats/update_sqlite_tables src/cats/make_sqlite_tables src/cats/grant_sqlite_privileges src/cats/drop_sqlite_tables src/cats/drop_sqlite_database src/cats/create_sqlite3_database src/cats/update_sqlite3_tables src/cats/make_sqlite3_tables src/cats/grant_sqlite3_privileges src/cats/drop_sqlite3_tables src/cats/drop_sqlite3_database src/cats/sqlite src/cats/mysql src/cats/create_bdb_database src/cats/update_bdb_tables src/cats/make_bdb_tables src/cats/grant_bdb_privileges src/cats/drop_bdb_tables src/cats/drop_bdb_database src/cats/create_bacula_database src/cats/update_bacula_tables src/cats/grant_bacula_privileges src/cats/make_bacula_tables src/cats/drop_bacula_tables src/cats/drop_bacula_database src/findlib/Makefile src/tools/Makefile po/Makefile.in updatedb/update_mysql_tables_10_to_11 updatedb/update_sqlite3_tables_10_to_11 updatedb/update_postgresql_tables_10_to_11 updatedb/update_sqlite_tables_10_to_11 $PFILES"
ac_config_commands="$ac_config_commands default"
"src/findlib/Makefile") CONFIG_FILES="$CONFIG_FILES src/findlib/Makefile" ;;
"src/tools/Makefile") CONFIG_FILES="$CONFIG_FILES src/tools/Makefile" ;;
"po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
+ "updatedb/update_mysql_tables_10_to_11") CONFIG_FILES="$CONFIG_FILES updatedb/update_mysql_tables_10_to_11" ;;
+ "updatedb/update_sqlite3_tables_10_to_11") CONFIG_FILES="$CONFIG_FILES updatedb/update_sqlite3_tables_10_to_11" ;;
+ "updatedb/update_postgresql_tables_10_to_11") CONFIG_FILES="$CONFIG_FILES updatedb/update_postgresql_tables_10_to_11" ;;
+ "updatedb/update_sqlite_tables_10_to_11") CONFIG_FILES="$CONFIG_FILES updatedb/update_sqlite_tables_10_to_11" ;;
"$PFILES") CONFIG_FILES="$CONFIG_FILES $PFILES" ;;
"default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
chmod 755 bconsole gconsole mtx-changer devel_bacula logrotate
cd ..
+c=updatedb
+chmod 755 $c/update_mysql_tables_10_to_11 $c/update_sqlite3_tables_10_to_11
+chmod 755 $c/update_postgresql_tables_10_to_11 $c/update_sqlite_tables_10_to_11
+
c=src/cats
chmod 755 $c/create_bacula_database $c/update_bacula_tables $c/make_bacula_tables
INSTALL = @INSTALL@
SUBDIRS = freebsd redhat solaris unknown openbsd irix gentoo \
- debian darwin aix bsdi mandrake slackware alpha
+ debian darwin aix bsdi mandrake slackware alpha ubuntu
MAKE = make
--- /dev/null
+#
+# This file is used as the template to create the
+# Makefile for the Debian/Ubuntu/Kubuntu specific installation.
+#
+# 21 March 2008 -- Kern Sibbald
+#
+# for Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
+#
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ -m 754
+
+nothing:
+
+install: install-autostart
+
+install-autostart: install-autostart-fd install-autostart-sd install-autostart-dir
+
+install_logrotate:
+ @$(INSTALL_PROGRAM) ../../scripts/logrotate $(DESTDIR)/etc/logrotate.d/bacula
+
+install-autostart-fd: uninstall-autostart-fd
+ @echo "Installing bacula-fd boot script ..."
+ @$(INSTALL_PROGRAM) bacula-fd $(DESTDIR)/etc/init.d/bacula-fd
+ @echo "Installing bacula-fd symlinks ..."
+ @if test x$(DESTDIR) = x ; then \
+ /usr/sbin/update-rc.d bacula-fd start 91 2 3 4 5 . stop 9 0 1 6 .; \
+ fi
+
+
+install-autostart-sd: uninstall-autostart-sd
+ @echo "Installing bacula-sd boot script ..."
+ @$(INSTALL_PROGRAM) bacula-sd $(DESTDIR)/etc/init.d/bacula-sd
+ @echo "Installing bacula-sd symlinks ..."
+ @if test "x$(DESTDIR)" = "x" ; then \
+ /usr/sbin/update-rc.d bacula-sd start 91 2 3 4 5 . stop 9 0 1 6 .; \
+ fi
+
+
+install-autostart-dir: uninstall-autostart-dir
+ @echo "Installing bacula-dir boot script ..."
+ @$(INSTALL_PROGRAM) bacula-dir $(DESTDIR)/etc/init.d/bacula-dir
+ @echo "Installing bacula-dir symlinks ..."
+ @if test "x$(DESTDIR)" = "x" ; then \
+ /usr/sbin/update-rc.d bacula-dir start 90 2 3 4 5 . stop 9 0 1 6 .; \
+ fi
+
+
+uninstall: uninstall-autostart
+
+uninstall-autostart: uninstall-autostart-fd uninstall-autostart-sd uninstall-autostart-dir
+
+uninstall-logrotate:
+ @rm -f $(DESTDIR)/etc/logrotate.d/bacula
+
+uninstall-autostart-fd:
+ @if test "x$(DESTDIR)" = "x" -a -f /etc/init.d/bacula-fd; then \
+ /etc/init.d/bacula-fd stop; \
+ rm -f $(DESTDIR)/etc/init.d/bacula-fd; \
+ /usr/sbin/update-rc.d bacula-fd remove; \
+ fi
+
+
+uninstall-autostart-sd:
+ @if test "x$(DESTDIR)" = "x" -a -f /etc/init.d/bacula-sd; then \
+ /etc/init.d/bacula-sd stop; \
+ rm -f $(DESTDIR)/etc/init.d/bacula-sd; \
+ /usr/sbin/update-rc.d bacula-sd remove; \
+ fi
+
+uninstall-autostart-dir:
+ @if test "x$(DESTDIR)" = "x" -a -f /etc/init.d/bacula-dir; then \
+ /etc/init.d/bacula-dir stop; \
+ rm -f $(DESTDIR)/etc/init.d/bacula-dir; \
+ /usr/sbin/update-rc.d bacula-dir remove; \
+ fi
+ @rm -f $(DESTDIR)/etc/init.d/bacula-dir
+
+clean:
+ @rm -f 1 2 3
+
+distclean: clean
+ @rm -f Makefile
+ @rm -f bacula-sd bacula-fd bacula-dir
+
+devclean: clean
+ @rm -f Makefile
+ @rm -f bacula-sd bacula-fd bacula-dir
--- /dev/null
+#! /bin/sh
+#
+# bacula This shell script takes care of starting and stopping
+# the bacula Director daemon on Debian/Ubuntu/Kubuntu
+# systems.
+#
+# Kern E. Sibbald - 21 March 2008
+#
+# For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
+#
+
+NAME="bacula-dir"
+DESC="Bacula Director"
+DAEMON=@sbindir@/${NAME}
+BUSER=@dir_user@
+BGROUP=@dir_group@
+BOPTIONS="-c @sysconfdir@/${NAME}.conf"
+BPORT=@dir_port@
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+
+test -f $DAEMON || exit 0
+
+if [ -n "`getent services ${NAME}`" ]; then
+ BPORT=`getent services ${NAME} | awk '{ gsub("/tcp","",$2); print $2; }'`
+fi
+
+PIDFILE=@piddir@/${NAME}.${BPORT}.pid
+
+if [ "x${BUSER}" != "x" ]; then
+ BOPTIONS="${BOPTIONS} -u ${BUSER}"
+fi
+if [ "x${BGROUP}" != "x" ]; then
+ BOPTIONS="${BOPTIONS} -g ${BGROUP}"
+fi
+
+case "$1" in
+ start)
+ echo -n "Starting ${DESC}: "
+ start-stop-daemon --start --quiet --pidfile ${PIDFILE} --exec ${DAEMON} -- ${BOPTIONS}
+ echo "${NAME}"
+ ;;
+ stop)
+ echo -n "Stopping ${DESC}: "
+ start-stop-daemon --oknodo --stop --quiet --exec ${DAEMON} -- ${BOPTIONS}
+ echo "${NAME}"
+ ;;
+ restart|force-reload)
+ $0 stop
+ sleep 5
+ $0 start
+ ;;
+ *)
+ echo "Usage: /etc/init.d/${NAME} {start|stop|restart|force-reload}" >&2
+ exit 1
+ ;;
+esac
+exit 0
--- /dev/null
+#! /bin/sh
+#
+# bacula This shell script takes care of starting and stopping
+# the bacula Director daemon on Debian/Ubuntu/Kubuntu
+# systems.
+#
+# Kern E. Sibbald - 21 March 2008
+#
+# For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
+#
+
+NAME="bacula-fd"
+DESC="Bacula File Daemon"
+DAEMON=@sbindir@/${NAME}
+BUSER=@fd_user@
+BGROUP=@fd_group@
+BOPTIONS="-c @sysconfdir@/${NAME}.conf"
+BPORT=@fd_port@
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+
+test -f $DAEMON || exit 0
+
+if [ -n "`getent services ${NAME}`" ]; then
+ BPORT=`getent services ${NAME} | awk '{ gsub("/tcp","",$2); print $2; }'`
+fi
+
+PIDFILE=@piddir@/${NAME}.${BPORT}.pid
+
+if [ "x${BUSER}" != "x" ]; then
+ BOPTIONS="${BOPTIONS} -u ${BUSER}"
+fi
+if [ "x${BGROUP}" != "x" ]; then
+ BOPTIONS="${BOPTIONS} -g ${BGROUP}"
+fi
+
+case "$1" in
+ start)
+ echo -n "Starting ${DESC}: "
+ start-stop-daemon --start --quiet --pidfile ${PIDFILE} --exec ${DAEMON} -- ${BOPTIONS}
+ echo "${NAME}"
+ ;;
+ stop)
+ echo -n "Stopping ${DESC}: "
+ start-stop-daemon --oknodo --stop --quiet --exec ${DAEMON} -- ${BOPTIONS}
+ echo "${NAME}"
+ ;;
+ restart|force-reload)
+ $0 stop
+ sleep 5
+ $0 start
+ ;;
+ *)
+ echo "Usage: /etc/init.d/${NAME} {start|stop|restart|force-reload}" >&2
+ exit 1
+ ;;
+esac
+exit 0
--- /dev/null
+#! /bin/sh
+#
+# bacula This shell script takes care of starting and stopping
+# the bacula Director daemon on Debian/Ubuntu/Kubuntu
+# systems.
+#
+# Kern E. Sibbald - 21 March 2008
+#
+# For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
+#
+
+NAME="bacula-sd"
+DESC="Bacula Storage Daemon"
+DAEMON=@sbindir@/${NAME}
+BUSER=@sd_user@
+BGROUP=@sd_group@
+BOPTIONS="-c @sysconfdir@/${NAME}.conf"
+BPORT=@sd_port@
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+
+test -f $DAEMON || exit 0
+
+if [ -n "`getent services ${NAME}`" ]; then
+ BPORT=`getent services ${NAME} | awk '{ gsub("/tcp","",$2); print $2; }'`
+fi
+
+PIDFILE=@piddir@/${NAME}.${BPORT}.pid
+
+if [ "x${BUSER}" != "x" ]; then
+ BOPTIONS="${BOPTIONS} -u ${BUSER}"
+fi
+if [ "x${BGROUP}" != "x" ]; then
+ BOPTIONS="${BOPTIONS} -g ${BGROUP}"
+fi
+
+case "$1" in
+ start)
+ echo -n "Starting ${DESC}: "
+ start-stop-daemon --start --quiet --pidfile ${PIDFILE} --exec ${DAEMON} -- ${BOPTIONS}
+ echo "${NAME}"
+ ;;
+ stop)
+ echo -n "Stopping ${DESC}: "
+ start-stop-daemon --oknodo --stop --quiet --exec ${DAEMON} -- ${BOPTIONS}
+ echo "${NAME}"
+ ;;
+ restart|force-reload)
+ $0 stop
+ sleep 5
+ $0 start
+ ;;
+ *)
+ echo "Usage: /etc/init.d/${NAME} {start|stop|restart|force-reload}" >&2
+ exit 1
+ ;;
+esac
+exit 0
OPTIONS="${OPTIONS} -g ${DIR_GROUP}"
fi
- if [ "${VALGRIND}" != '' ]; then
+ if [ "x${VALGRIND}" = "x1" ]; then
valgrind --leak-check=full ${BACDIRBIN}/bacula-dir $2 ${OPTIONS} -v -c ${BACDIRCFG}/bacula-dir.conf
else
${BACDIRBIN}/bacula-dir $2 ${OPTIONS} -v -c ${BACDIRCFG}/bacula-dir.conf
/*
Bacula® - The Network Backup Solution
- Copyright (C) 2000-2007 Free Software Foundation Europe e.V.
+ Copyright (C) 2000-2008 Free Software Foundation Europe e.V.
The main author of Bacula is Kern Sibbald, with contributions from
many others, a complete list can be found in the file AUTHORS.
static int db_create_file_record(JCR *jcr, B_DB *mdb, ATTR_DBR *ar)
{
int stat;
- static char *no_digest = "0";
- char *digest;
+ static const char *no_digest = "0";
+ const char *digest;
ASSERT(ar->JobId);
ASSERT(ar->PathId);
exit(1);
}
already_here = true;
+ debug_level = 0; /* turn off debug */
stop_watchdog();
generate_daemon_event(NULL, "Exit");
unload_plugins();
static bool list_nextvol(UAContext *ua, int ndays)
{
JOB *job;
- JCR *jcr = ua->jcr;
+ JCR *jcr;
USTORE store;
RUN *run;
time_t runtime;
} else {
job = (JOB *)GetResWithName(R_JOB, ua->argv[i]);
if (!job) {
- Jmsg(jcr, M_ERROR, 0, _("%s is not a job name.\n"), ua->argv[i]);
+ Jmsg(ua->jcr, M_ERROR, 0, _("%s is not a job name.\n"), ua->argv[i]);
if ((job = select_job_resource(ua)) == NULL) {
return false;
}
}
}
+
+ jcr = new_jcr(sizeof(JCR), dird_free_jcr);
for (run=NULL; (run = find_next_run(run, job, runtime, ndays)); ) {
if (!complete_jcr_for_job(jcr, job, run->pool)) {
- return false;
+ found = false;
+ goto get_out;
}
if (!jcr->jr.PoolId) {
- ua->error_msg(_("Could not Pool Job %s\n"), job->name());
+ ua->error_msg(_("Could not find Pool for Job %s\n"), job->name());
continue;
}
memset(&pr, 0, sizeof(pr));
pr.PoolId = jcr->jr.PoolId;
- if (!db_get_pool_record(ua->jcr, ua->db, &pr)) {
+ if (!db_get_pool_record(jcr, jcr->db, &pr)) {
bstrncpy(pr.Name, "*UnknownPool*", sizeof(pr.Name));
}
mr.PoolId = jcr->jr.PoolId;
job->name(), pr.Name, level_to_str(run->level), mr.VolumeName);
found = true;
}
- if (jcr->db && jcr->db != ua->db) {
- db_close_database(jcr, jcr->db);
- jcr->db = NULL;
- }
}
+
+get_out:
+ db_close_database(jcr, jcr->db);
+ jcr->db = NULL;
+ free_jcr(jcr);
if (!found) {
ua->error_msg(_("Could not find next Volume for Job %s.\n"),
job->hdr.name);
exit(1); /* prevent loops */
}
already_here = true;
+ debug_level = 0; /* turn off debug */
stop_watchdog();
bnet_stop_thread_server(server_tid);
for (k=0; k<fo->regex.size(); k++) {
regfree((regex_t *)fo->regex.get(k));
}
+ for (k=0; k<fo->regexdir.size(); k++) {
+ regfree((regex_t *)fo->regexdir.get(k));
+ }
+ for (k=0; k<fo->regexfile.size(); k++) {
+ regfree((regex_t *)fo->regexfile.get(k));
+ }
fo->regex.destroy();
fo->regexdir.destroy();
fo->regexfile.destroy();
/*
Bacula® - The Network Backup Solution
- Copyright (C) 2006-2006 Free Software Foundation Europe e.V.
+ Copyright (C) 2006-2008 Free Software Foundation Europe e.V.
The main author of Bacula is Kern Sibbald, with contributions from
many others, a complete list can be found in the file AUTHORS.
if (bufp->cflags & REG_ICASE) {
char *p, *lcase = bstrdup(regex);
for( p = lcase; *p ; p++) {
- *p = tolower(*p);
+ *p = tolower(*p);
}
re_compile_pattern(bufp, (unsigned char *)lcase);
bfree(lcase);
}
void re_registers_to_regmatch(regexp_registers_t old_regs,
- regmatch_t pmatch[],
- size_t nmatch)
+ regmatch_t pmatch[],
+ size_t nmatch)
{
size_t i=0;
int len = strlen(string);
struct re_registers regs;
stat = re_search(preg, (unsigned char *)string, len, 0, len, ®s);
- re_registers_to_regmatch(®s, pmatch, nmatch);
+ if (stat >= 0) {
+ re_registers_to_regmatch(®s, pmatch, nmatch);
+ }
/* stat is the start position in the string base 0 where
* the pattern was found or negative if not found.
*/
if (bufp->cflags & REG_ICASE) { /* we must use string in lowercase */
int len = strlen((const char *)str);
if (!bufp->lcase) {
- bufp->lcase = get_pool_memory(PM_FNAME);
+ bufp->lcase = get_pool_memory(PM_FNAME);
}
check_pool_memory_size(bufp->lcase, len+1);
unsigned char *dst = (unsigned char *)bufp->lcase;
while (*string) {
- *dst++ = tolower(*string++);
+ *dst++ = tolower(*string++);
}
*dst = '\0';
string = (unsigned char *)bufp->lcase;
exit(1);
}
in_here = true;
+ debug_level = 0; /* turn off any debug */
stop_watchdog();
if (sig == SIGTERM) { /* normal shutdown request? */
Dmsg1(200, "In terminate_stored() sig=%d\n", sig);
+ free_volume_list();
+
foreach_res(device, R_DEVICE) {
Dmsg1(10, "Term device %s\n", device->device_name);
if (device->dev) {
}
term_msg();
cleanup_crypto();
- free_volume_list();
term_reservations_lock();
close_memory_pool();
#undef VERSION
#define VERSION "2.3.16"
-#define BDATE "04 April 2008"
-#define LSMDATE "04Apr08"
+#define BDATE "06 April 2008"
+#define LSMDATE "06Apr08"
#define PROG_COPYRIGHT "Copyright (C) %d-2008 Free Software Foundation Europe e.V.\n"
#define BYEAR "2008" /* year for copyright messages in progs */
General:
+06Apr08
+kes Correctly detect Ubuntu systems, and add ubuntu platform directory.
+kes Fix bug #1063, reuse of freed ptr in list nextvol.
+kes Release regex compile buffer in filed/job.c
+kes Add proper type of const char in sql_create.c
+kes Turn off debug in daemon termination routines
+kes Move free_volume_list() before devices are freed in stored.c
+kes Fix reference to uninitalized stack variables in bregex.c.
+ This should correct bug #1067.
+04Apr08
+kes Fix possible seg fault in SD when freeing a volume entry.
03Apr08
kes Implement unload_dev() before swap device.
ebl Add statistics prunning with option and menu