mirror of
https://github.com/valitydev/salt.git
synced 2024-11-09 01:36:48 +00:00
fix blockdev.tune issue, where blockdev.tune doesn't report changes for read-write option and where it didn't translate boolean options properly, causing the underlying blockdev call to fail
This commit is contained in:
parent
3012e98577
commit
d29bb2f24a
@ -52,7 +52,9 @@ def tune(device, **kwargs):
|
||||
switch = kwarg_map[key]
|
||||
if key != 'read-write':
|
||||
args.append(switch.replace('set', 'get'))
|
||||
if kwargs[key] == 'True':
|
||||
else:
|
||||
args.append('getro')
|
||||
if kwargs[key] == 'True' or kwargs[key] == True:
|
||||
opts += '--{0} '.format(key)
|
||||
else:
|
||||
opts += '--{0} {1} '.format(switch, kwargs[key])
|
||||
|
Loading…
Reference in New Issue
Block a user