Revision fdd9ac5b tools/cfgupgrade

b/tools/cfgupgrade
102 102
  options.SERVER_PEM_PATH = options.data_dir + "/server.pem"
103 103
  options.KNOWN_HOSTS_PATH = options.data_dir + "/known_hosts"
104 104
  options.RAPI_CERT_FILE = options.data_dir + "/rapi.pem"
105
  options.RAPI_USERS_FILE = options.data_dir + "/rapi/users"
106
  options.RAPI_USERS_FILE_PRE24 = options.data_dir + "/rapi_users"
105 107
  options.CONFD_HMAC_KEY = options.data_dir + "/hmac.key"
106 108
  options.CDS_FILE = options.data_dir + "/cluster-domain-secret"
107 109

  
......
155 157
    raise Error("Configuration version %d.%d.%d not supported by this tool" %
156 158
                (config_major, config_minor, config_revision))
157 159

  
160
  if os.path.isfile(options.RAPI_USERS_FILE_PRE24):
161
    logging.info("Found pre-2.4 RAPI users file at %s, renaming to %s",
162
                 options.RAPI_USERS_FILE_PRE24, options.RAPI_USERS_FILE)
163
    utils.RenameFile(options.RAPI_USERS_FILE_PRE24, options.RAPI_USERS_FILE,
164
                     mkdir=True, mkdir_mode=0750)
165

  
166
  # Create a symlink for RAPI users file
167
  if not os.path.islink(options.RAPI_USERS_FILE_PRE24):
168
    logging.info("Creating symlink from %s to %s",
169
                 options.RAPI_USERS_FILE_PRE24, options.RAPI_USERS_FILE)
170
    os.symlink(options.RAPI_USERS_FILE, options.RAPI_USERS_FILE_PRE24)
171

  
158 172
  try:
159 173
    logging.info("Writing configuration file to %s", options.CONFIG_DATA_PATH)
160 174
    utils.WriteFile(file_name=options.CONFIG_DATA_PATH,

Also available in: Unified diff