Revision 9772cb94
b/snf-deploy/fabfile.py | ||
---|---|---|
299 | 299 |
custom = customize_settings_from_tmpl(tmpl, replace) |
300 | 300 |
try: |
301 | 301 |
put(custom, tmpl) |
302 |
cmd = """ |
|
303 |
echo "\ |
|
304 |
# This has been generated automatically by snf-deploy, at |
|
305 |
# $(date). |
|
306 |
# The immutable bit (+i attribute) has been used to avoid it being |
|
307 |
# overwritten by software such as NetworkManager or resolvconf. |
|
308 |
# Use lsattr/chattr to view or modify its file attributes. |
|
309 |
|
|
310 |
|
|
311 |
$(cat {0})" > {0} |
|
312 |
""".format(tmpl) |
|
313 |
try_run(cmd) |
|
302 | 314 |
except: |
303 | 315 |
pass |
304 | 316 |
try_run("chattr +i /etc/resolv.conf") |
Also available in: Unified diff