Put the sed insert statement back in to the output.

Turns out that commit a369c883 (merged in PR #18368) make a bad change to modules/makeconf.py where it removed the insertion part of a '/regex/ i\text' construction.
This commit is contained in:
Kaithar 2015-05-05 14:04:05 +01:00
parent 02658b1e60
commit 8d9acd1f89

View File

@ -40,8 +40,10 @@ def _add_var(var, value):
fullvar = '{0}="{1}"'.format(var, value)
if __salt__['file.contains'](makeconf, layman):
# TODO perhaps make this a function in the file module?
cmd = ['sed', '-i', '/{0}/'.format(layman.replace('/', '\\/')),
fullvar, makeconf]
cmd = ['sed', '-i', '/{0}/ i\{1}'.format(
layman.replace('/', '\\/'),
fullvar),
makeconf]
__salt__['cmd.run'](cmd)
else:
__salt__['file.append'](makeconf, fullvar)