mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Merge pull request #19902 from jfindlay/fix_blkid
test for blkid before running disk.blkid
This commit is contained in:
commit
938af03520
@ -10,6 +10,7 @@ import re
|
|||||||
|
|
||||||
# Import salt libs
|
# Import salt libs
|
||||||
import salt.utils
|
import salt.utils
|
||||||
|
import salt.utils.decorators as decorators
|
||||||
|
|
||||||
from salt.exceptions import CommandExecutionError
|
from salt.exceptions import CommandExecutionError
|
||||||
|
|
||||||
@ -194,9 +195,11 @@ def percent(args=None):
|
|||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
|
||||||
|
@decorators.which('blkid')
|
||||||
def blkid(device=None):
|
def blkid(device=None):
|
||||||
'''
|
'''
|
||||||
Return block device attributes: UUID, LABEL, etc.
|
Return block device attributes: UUID, LABEL, etc. This function only works
|
||||||
|
on systems where blkid is available.
|
||||||
|
|
||||||
CLI Example:
|
CLI Example:
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user