X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=source%2Futils.py;h=8f8b0bd5c1c4eb3b7453130c7520cb25478df5f1;hb=3a2a07818ad1b9a374a7ec78e8c4573a043dc338;hp=e0f3c72d00d686d5a68dd741849f009318b7f96d;hpb=64ddfcb8ba5498bd25f469d5daabdbcafbc41821;p=bootmanager.git diff --git a/source/utils.py b/source/utils.py index e0f3c72..8f8b0bd 100644 --- a/source/utils.py +++ b/source/utils.py @@ -313,3 +313,12 @@ def sha1_file(filename): return m.hexdigest() except IOError: raise BootManagerException("Cannot calculate SHA1 hash of {}".format(filename)) + +def display_disks_status(PARTITIONS, message, log): + log.write("{} - PARTITIONS status - BEG\n".format(message)) + sysexec_noerr("vgdisplay", log) + sysexec_noerr("pvdisplay", log) + for name, path in PARTITIONS.items(): + log.write("PARTITIONS[{}]={}\n".format(name,path)) + sysexec_noerr("ls -l {}".format(path), log) + log.write("{} - PARTITIONS status - END\n".format(message))