bacula/bacula.patch

Tue, 28 Aug 2012 18:36:20 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 28 Aug 2012 18:36:20 +0200
changeset 577
e3c6a8f912f4
parent 220
a6cd892638c1
child 578
ac1eb2cd38a8
permissions
-rw-r--r--

Blindly commit previous changes before reworking for forthcoming stack release.

     1 Index: manpages/Makefile.in
     2 diff -Nau manpages/Makefile.in.orig manpages/Makefile.in
     3 --- manpages/Makefile.in.orig	2010-08-05 16:29:51.000000000 +0200
     4 +++ manpages/Makefile.in	2011-05-01 17:26:43.000000000 +0200
     5 @@ -20,23 +20,21 @@
     6  install:
     7  	$(MKDIR) $(DESTDIR)/$(mandir)/man8
     8  	for I in ${MAN8}; \
     9 -	  do ($(RMF) $$I.gz; gzip -c $$I >$$I.gz; \
    10 -	     $(INSTALL_DATA) $$I.gz $(DESTDIR)$(mandir)/man8/$$I.gz; \
    11 -	     rm -f $$I.gz); \
    12 +	  do \
    13 +	     $(INSTALL_DATA) $$I $(DESTDIR)$(mandir)/man8/$$I; \
    14  	done
    15  	$(MKDIR) $(DESTDIR)/$(mandir)/man1
    16  	for I in ${MAN1}; \
    17 -	  do ($(RMF) $$I.gz; gzip -c $$I >$$I.gz; \
    18 -	     $(INSTALL_DATA) $$I.gz $(DESTDIR)$(mandir)/man1/$$I.gz; \
    19 -	     rm -f $$I.gz); \
    20 +	  do  \
    21 +	     $(INSTALL_DATA) $$I $(DESTDIR)$(mandir)/man1/$$I; \
    22  	done
    24  uninstall:
    25  	for I in ${MAN8}; \
    26 -	  do (rm -f $(DESTDIR)$(mandir)/man8/$$I.gz); \
    27 +	  do (rm -f $(DESTDIR)$(mandir)/man8/$$I); \
    28  	done
    29  	for I in ${MAN1}; \
    30 -	  do (rm -f $(DESTDIR)$(mandir)/man1/$$I.gz); \
    31 +	  do (rm -f $(DESTDIR)$(mandir)/man1/$$I); \
    32  	done
    34  clean:
    35 Index: scripts/bacula.in
    36 diff -Nau scripts/bacula.in.orig scripts/bacula.in
    37 --- scripts/bacula.in.orig	2010-08-05 16:29:51.000000000 +0200
    38 +++ scripts/bacula.in	2011-05-01 17:26:43.000000000 +0200
    39 @@ -13,37 +13,43 @@
    40  #  easier to "steal" this code for the development 
    41  #  environment where they are different.
    42  #  
    43 -SCRIPTDIR=@scriptdir@
    44 +SCRIPTDIR=@libexecdir@
    45  #
    46  # Disable Glibc malloc checks, it doesn't help and it keeps from getting
    47  #   good dumps
    48  MALLOC_CHECK_=0
    49  export MALLOC_CHECK_
    51 -case "$1" in
    52 +action=$1
    53 +debug=$2
    54 +[ -n "$3" ] && enable_dir=$3 || enable_dir=yes
    55 +[ -n "$4" ] && enable_sd=$4  || enable_sd=yes
    56 +[ -n "$5" ] && enable_fd=$5  || enable_fd=yes
    57 + 
    58 +case "$action" in
    59     start)
    60 -      [ -x ${SCRIPTDIR}/bacula-ctl-sd ] && ${SCRIPTDIR}/bacula-ctl-sd $1 $2
    61 -      [ -x ${SCRIPTDIR}/bacula-ctl-fd ] && ${SCRIPTDIR}/bacula-ctl-fd $1 $2
    62 -      [ -x ${SCRIPTDIR}/bacula-ctl-dir ] && ${SCRIPTDIR}/bacula-ctl-dir $1 $2
    63 +      [ "$enable_sd" = "yes"  ] && [ -x ${SCRIPTDIR}/bacula-ctl-sd ] && ${SCRIPTDIR}/bacula-ctl-sd $1 $2
    64 +      [ "$enable_fd" = "yes"  ] && [ -x ${SCRIPTDIR}/bacula-ctl-fd ] && ${SCRIPTDIR}/bacula-ctl-fd $1 $2
    65 +      [ "$enable_dir" = "yes" ] && [ -x ${SCRIPTDIR}/bacula-ctl-dir ] && ${SCRIPTDIR}/bacula-ctl-dir $1 $2
    66        ;;
    68     stop)
    69        # Stop the FD first so that SD will fail jobs and update catalog
    70 -      [ -x ${SCRIPTDIR}/bacula-ctl-fd ] && ${SCRIPTDIR}/bacula-ctl-fd $1 $2
    71 -      [ -x ${SCRIPTDIR}/bacula-ctl-sd ] && ${SCRIPTDIR}/bacula-ctl-sd $1 $2
    72 -      [ -x ${SCRIPTDIR}/bacula-ctl-dir ] && ${SCRIPTDIR}/bacula-ctl-dir $1 $2
    73 +      [ "$enable_sd" = "yes"  ] && [ -x ${SCRIPTDIR}/bacula-ctl-sd ] && ${SCRIPTDIR}/bacula-ctl-sd $1 $2
    74 +      [ "$enable_fd" = "yes"  ] && [ -x ${SCRIPTDIR}/bacula-ctl-fd ] && ${SCRIPTDIR}/bacula-ctl-fd $1 $2
    75 +      [ "$enable_dir" = "yes" ] && [ -x ${SCRIPTDIR}/bacula-ctl-dir ] && ${SCRIPTDIR}/bacula-ctl-dir $1 $2
    76        ;;
    78     restart)
    79 -      $0 stop
    80 +      $0 stop $debug $enable_dir $enable_sd $enable_fd
    81        sleep 2
    82 -      $0 start
    83 +      $0 start $debug $enable_dir $enable_sd $enable_fd
    84        ;;
    86     status)
    87 -      [ -x ${SCRIPTDIR}/bacula-ctl-sd ] && ${SCRIPTDIR}/bacula-ctl-sd status
    88 -      [ -x ${SCRIPTDIR}/bacula-ctl-fd ] && ${SCRIPTDIR}/bacula-ctl-fd status
    89 -      [ -x ${SCRIPTDIR}/bacula-ctl-dir ] && ${SCRIPTDIR}/bacula-ctl-dir status
    90 +      [ "$enable_sd" = "yes"  ] && [ -x ${SCRIPTDIR}/bacula-ctl-sd ] && ${SCRIPTDIR}/bacula-ctl-sd status
    91 +      [ "$enable_fd" = "yes"  ] && [ -x ${SCRIPTDIR}/bacula-ctl-fd ] && ${SCRIPTDIR}/bacula-ctl-fd status
    92 +      [ "$enable_dir" = "yes" ] && [ -x ${SCRIPTDIR}/bacula-ctl-dir ] && ${SCRIPTDIR}/bacula-ctl-dir status
    93        ;;
    95     *)
    96 Index: src/dird/bacula-dir.conf.in
    97 diff -Nau src/dird/bacula-dir.conf.in.orig src/dird/bacula-dir.conf.in
    98 --- src/dird/bacula-dir.conf.in.orig	2010-08-05 16:29:51.000000000 +0200
    99 +++ src/dird/bacula-dir.conf.in	2011-05-01 17:26:43.000000000 +0200
   100 @@ -29,7 +29,8 @@
   101    Level = Incremental
   102    Client = @basename@-fd 
   103    FileSet = "Full Set"
   104 -  Schedule = "WeeklyCycle"
   105 + #Schedule = "WeeklyCycle"
   106 +  Schedule = "NEVER"
   107    Storage = File
   108    Messages = Standard
   109    Pool = Default
   110 @@ -109,7 +110,7 @@
   111  #    directory to give a reasonable FileSet to backup to
   112  #    disk storage during initial testing.
   113  #
   114 -    File = @sbindir@
   115 +    File = @scriptdir@
   116    }
   118  #
   119 @@ -126,6 +127,11 @@
   120    }
   121  }
   123 +# This schedule can be used to disable automatic scheduling
   124 +Schedule {
   125 +  Name = NEVER
   126 +}
   127 +
   128  #
   129  # When to do the backups, full backup on first sunday of the month,
   130  #  differential (i.e. incremental since full) every other sunday,

mercurial