mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Backporting #48087 to 2018.3
This commit is contained in:
parent
af1075b26d
commit
56c87ff690
1 changed files with 1 additions and 1 deletions
|
@ -165,7 +165,7 @@ def persist(name, value, config='/etc/sysctl.conf'):
|
|||
if not edited:
|
||||
nlines.append("{0}\n".format(_formatfor(name, value, config)))
|
||||
with salt.utils.files.fopen(config, 'w+') as ofile:
|
||||
nlines = [salt.utils.stringutils.to_str(_l) for _l in nlines]
|
||||
nlines = [salt.utils.stringutils.to_str(_l) + '\n' for _l in nlines]
|
||||
ofile.writelines(nlines)
|
||||
if config != '/boot/loader.conf':
|
||||
assign(name, value)
|
||||
|
|
Loading…
Add table
Reference in a new issue