From 9742b3f4816a9e86980c7eaf3eb63acc10aa4d5c Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Tue, 19 Oct 2004 21:46:30 +0000 Subject: [PATCH] - Modify install of make_catalog_backup and delete_catalog_backup so that it will not overwrite any existing file. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1657 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/kernstodo | 3 +-- bacula/platforms/alpha/bacula-fd.in | 3 +-- bacula/platforms/openbsd/bacula-dir.in | 2 +- bacula/platforms/openbsd/bacula-sd.in | 2 +- bacula/src/cats/Makefile.in | 20 ++++++++++++++++++-- 5 files changed, 22 insertions(+), 8 deletions(-) diff --git a/bacula/kernstodo b/bacula/kernstodo index e68648b10c..f665da73fd 100644 --- a/bacula/kernstodo +++ b/bacula/kernstodo @@ -1,5 +1,5 @@ Kern's ToDo List - 04 October 2004 + 20 October 2004 Major development: Project Developer @@ -1387,4 +1387,3 @@ Block Position: 0 - Modify postgresql update script to remove bigint FilenameId reference. - Kill daemons at levels in the teens rather than late. - diff --git a/bacula/platforms/alpha/bacula-fd.in b/bacula/platforms/alpha/bacula-fd.in index c7b5e28f05..97fc249613 100644 --- a/bacula/platforms/alpha/bacula-fd.in +++ b/bacula/platforms/alpha/bacula-fd.in @@ -4,8 +4,7 @@ # the bacula File daemon. # # chkconfig: 2345 90 9 -# description: It comes by night and sucks the vital essence from your -computers. +# description: It comes by night and sucks the vital essence from your computers. # # for Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ # diff --git a/bacula/platforms/openbsd/bacula-dir.in b/bacula/platforms/openbsd/bacula-dir.in index 2ae3e5420b..e7e76b1618 100755 --- a/bacula/platforms/openbsd/bacula-dir.in +++ b/bacula/platforms/openbsd/bacula-dir.in @@ -3,7 +3,7 @@ # bacula This shell script takes care of starting and stopping # the bacula Director daemon # -# chkconfig: 2345 20 9 +# chkconfig: 2345 90 9 # description: It comes by night and sucks the vital essence from your computers. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ diff --git a/bacula/platforms/openbsd/bacula-sd.in b/bacula/platforms/openbsd/bacula-sd.in index ac86999824..fb55fb47cf 100755 --- a/bacula/platforms/openbsd/bacula-sd.in +++ b/bacula/platforms/openbsd/bacula-sd.in @@ -3,7 +3,7 @@ # bacula This shell script takes care of starting and stopping # the bacula Storage daemon. # -# chkconfig: 2345 20 9 +# chkconfig: 2345 90 9 # description: It comes by night and sucks the vital essence from your computers. # # For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ diff --git a/bacula/src/cats/Makefile.in b/bacula/src/cats/Makefile.in index 1301e8c94c..3372a51725 100644 --- a/bacula/src/cats/Makefile.in +++ b/bacula/src/cats/Makefile.in @@ -105,8 +105,24 @@ install: $(INSTALL_SCRIPT) drop_bacula_tables $(DESTDIR)$(scriptdir)/drop_bacula_tables $(INSTALL_SCRIPT) drop_bacula_database $(DESTDIR)$(scriptdir)/drop_bacula_database - $(INSTALL_SCRIPT) make_catalog_backup $(DESTDIR)$(scriptdir)/make_catalog_backup - $(INSTALL_SCRIPT) delete_catalog_backup $(DESTDIR)$(scriptdir)/delete_catalog_backup + @filename=make_catalog_backup; \ + if test -f ${DESTDIR}${scriptdir}/$$filename; then \ + destname=$$filename.new; \ + echo " ==> Found existing $$filename, installing new file as $$destname"; \ + else \ + destname=$$filename; \ + fi; \ + echo "${INSTALL_SCRIPT} $$filename ${DESTDIR}${scriptdir}/$$destname"; \ + ${INSTALL_SCRIPT} $$filename ${DESTDIR}${scriptdir}/$$destname + @filename=delete_catalog_backup; \ + if test -f ${DESTDIR}${scriptdir}/$$filename; then \ + destname=$$filename.new; \ + echo " ==> Found existing $$filename, installing new file as $$destname"; \ + else \ + destname=$$filename; \ + fi; \ + echo "${INSTALL_SCRIPT} $$filename ${DESTDIR}${scriptdir}/$$destname"; \ + ${INSTALL_SCRIPT} $$filename ${DESTDIR}${scriptdir}/$$destname uninstall: (cd $(DESTDIR)$(scriptdir); $(RMF) create_@DB_NAME@_database) -- 2.39.5