+ log.write("Updating network files in {}.\n".format(vserver_dir))
+ try:
+ # NOTE: this works around a recurring problem on public pl,
+ # suspected to be due to mismatch between 2.6.12 bootcd and
+ # 2.6.22/f8 root environment. files randomly show up with the
+ # immutible attribute set. this clears it before trying to write
+ # the files below.
+ utils.sysexec("chattr -i {}/etc/hosts".format(vserver_dir), log)
+ utils.sysexec("chattr -i {}/etc/resolv.conf".format(vserver_dir), log)
+ except:
+ pass
+