Project

General

Profile

bacula.patch

Emmanuel GARETTE, 10/15/2011 08:52 PM

Download (1.58 KB)

View differences:

/usr/share/eole/bacula/baculaconfig.py 2011-10-15 20:30:04.000000000 +0200
101 101
            print e
102 102
            sys.exit(1)
103 103

  
104
    def apply_conf():
104
    def apply_conf(no_reload):
105 105
        try:
106 106
            apply_bacula_support(load=False)
107 107
        except Disabled:
......
126 126
            print e
127 127
            sys.exit(1)
128 128

  
129
        try:
130
            run_bacula_cmd('reload')
131
        except Exception, e:
132
            print e
133
            sys.exit(1)
129
        if not no_reload:
130
            try:
131
                run_bacula_cmd('reload')
132
            except Exception, e:
133
                print e
134
                sys.exit(1)
134 135

  
135 136
    def run_back():
136 137
        try:
......
155 156
            default=False, help=u"Liste les configurations")
156 157
    parser.add_option("-a", "--apply", action="store_true", dest="apply_c",
157 158
            default=False, help=u"Applique les configurations")
159
    parser.add_option("--no-reload", action="store_true", dest="no_reload",
160
            default=False, help=u"Ne pas recharger Bacula lors de l'application")
158 161
    group = OptionGroup(parser, "Configuration du support de sauvegarde")
159 162
    group.add_option("-s", "--support", dest="support", help=u"Type du support de sauvegarde (usb, smb ou manual)")
160 163
    group.add_option("--usb_path", dest="usb_path", help=u"Support usb : chemin du disque usb")
......
212 215
        display_infos()
213 216

  
214 217
    if options.apply_c != False:
215
        apply_conf()
218
        apply_conf(options.no_reload)
216 219

  
217 220
    if options.now != False:
218 221
        run_back()