255
255
pw = pwd.getpwnam("contrail")
256
256
os.chown("/etc/contrail/supervisord_config_files/ifmap.ini", pw.pw_uid,
258
shutil.copy("files/ifmap", "/etc/init.d")
259
src = "files/ifmap-3.1" \
260
if version_compare(CONTRAIL_VERSION, "3.1") >= 0 \
262
shutil.copy(src, "/etc/init.d/ifmap")
259
263
os.chmod("/etc/init.d/ifmap", 0755)
261
265
def fix_nodemgr():
262
266
# add files missing from contrail-nodemgr package
263
shutil.copy("files/contrail-nodemgr-config.ini",
264
"/etc/contrail/supervisord_config_files")
267
dest = "/etc/contrail/supervisord_config_files/" \
268
+ ("contrail-config-nodemgr.ini" \
269
if version_compare(CONTRAIL_VERSION, "3.1") >= 0 \
270
else "contrail-nodemgr-config.ini")
271
shutil.copy("files/contrail-nodemgr-config.ini", dest)
265
272
pw = pwd.getpwnam("contrail")
266
os.chown("/etc/contrail/supervisord_config_files/contrail-nodemgr-config.ini",
267
pw.pw_uid, pw.pw_gid)
268
shutil.copy("files/contrail-config-nodemgr", "/etc/init.d")
273
os.chown(dest, pw.pw_uid, pw.pw_gid)
275
src = "files/contrail-config-nodemgr-3.1" \
276
if version_compare(CONTRAIL_VERSION, "3.1") >= 0 \
277
else "files/contrail-config-nodemgr"
278
shutil.copy(src, "/etc/init.d/contrail-config-nodemgr")
269
279
os.chmod("/etc/init.d/contrail-config-nodemgr", 0755)
271
281
# fake ntp status when inside a container