mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix DNS script cleanup
Generated errors like: 2015-07-14 00:36:56,143 [salt.loaded.int.module.cmdmod][ERROR ][16060] stderr: /bin/bash: -c: line 0: syntax error near unexpected token `then' Simply apply existing pattern from running_systemd function. It should probably all be revisited to work like bootstrap.sh but instead be shipped into python module as data files.
This commit is contained in:
parent
89649456e0
commit
456393d4db
1 changed files with 1 additions and 1 deletions
|
@ -2870,7 +2870,7 @@ def set_dns(name, dnsservers=None, searchdomains=None):
|
|||
name, 'sh -c "chmod +x {0};{0}"'.format(script), python_shell=True)
|
||||
# blindly delete the setter file
|
||||
run_all(name,
|
||||
'if [ -f "{0}" ];then rm -f "{0}";fi'.format(script),
|
||||
'sh -c \'if [ -f "{0}" ];then rm -f "{0}";fi\''.format(script),
|
||||
python_shell=True)
|
||||
if result['retcode'] != 0:
|
||||
error = ('Unable to write to /etc/resolv.conf in container \'{0}\''
|
||||
|
|
Loading…
Add table
Reference in a new issue