Fixed partition names with spaces effectively containing only the first word.

This commit is contained in:
zer0def 2018-06-08 13:17:20 +02:00
parent 0dcaead36d
commit 07f863101f

View file

@ -528,7 +528,7 @@ def name(device, partition, name):
'Invalid characters passed to partition.name'
)
cmd = 'parted -m -s {0} name {1} {2}'.format(device, partition, name)
cmd = '''parted -m -s {0} name {1} "'{2}'"'''.format(device, partition, name)
out = __salt__['cmd.run'](cmd).splitlines()
return out