Ignore:
Timestamp:
Sep 21, 2012, 5:54:40 PM (12 years ago)
Author:
joergs
Message:

improvements

File:
1 edited

Legend:

Unmodified
Added
Removed
  • opsi/server/dass-opsi-tools/usr/bin/opsi-bacula-server-conf.py

    r1100 r1105  
    3636    #AutoPrune = yes
    3737    #}
    38     params = [ "FDPort", "Catalog", "FileRetention", "JobRetention", "AutoPrune" ]
     38    params = [ "FDPort", "FileRetention", "JobRetention", "AutoPrune" ]
    3939    fd.write( "Client {\n" )
    40     fd.write( "  Name     = " + properties['filedaemon_full_name'] + "\n" )
    41     fd.write( "  Address  = " + client['clientId'] + "\n" )
     40    fd.write( '  Name     = "' + properties['filedaemon_full_name'] + '"' + "\n" )
     41    fd.write( '  Address  = "' + client['clientId'] + '"' + "\n" )
    4242    # ipAddress: method host_getObjects [] '{"id":client['clientId']}'
    4343    #print "  # Address =", ipAddress
    44     fd.write( "  Password = " + properties['filedaemon_full_password'] + "\n" )
    45     fd.write( "  Catalog  = " + catalog + "\n" )
     44    fd.write( '  Password = "' + properties['filedaemon_full_password'] + '"' + "\n" )
     45    fd.write( '  Catalog  = "' + properties['catalog'] + '"' + "\n" )
    4646    for i in params:
    4747        try:
    48             fd.write( " " + i + " = " + properties[i.lower()] + "\n" )
     48            fd.write( '  ' + i + ' = "' + properties[i.lower()] + '"' + "\n" )
    4949        except KeyError:
    50             fd.write( "  # " + i + " = "  + "\n" )
     50            fd.write( '  # ' + i + " = \n" )
    5151    fd.write( "}\n")
    5252    fd.write( "\n" )
     
    6565    params = [ "Fileset", "JobDefs" ]
    6666    fd.write( "Job {" + "\n" )
    67     fd.write( "  Name    = " + client['clientId'] + "-job" + "\n" )
    68     fd.write( "  Client  = " + properties['filedaemon_full_name'] + "\n" )
     67    fd.write( '  Name    = "' + client['clientId'] + '-job"' + "\n" )
     68    fd.write( '  Client  = "' + properties['filedaemon_full_name'] + '"' + "\n" )
    6969    for i in params:
    7070        fd.write( "  " )
     
    7272            if not properties[i.lower()]:
    7373                fd.write( "# " )
    74             fd.write( i + " = " + properties[i.lower()] + "\n" )
     74            fd.write( i + ' = "' + properties[i.lower()] + '"' + "\n" )
    7575        except KeyError:
    7676            fd.write( "# " + i + " = " + "\n" )
Note: See TracChangeset for help on using the changeset viewer.