Merge pull request #40 from moduon/refresh-after-partitioning

fix: mkfs randomly not detecting just partitioned device
This commit is contained in:
Jörg Thalheim 2022-09-12 22:15:58 +02:00 committed by GitHub
commit c3da181593
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -464,6 +464,8 @@ rec {
${concatMapStringsSep "" (flag: ''
parted -s ${dev} set ${toString config.index} ${flag} on
'') config.flags}
# ensure further operations can detect new partitions
udevadm trigger --subsystem-match=block; udevadm settle
${optionalString (!isNull config.content) (config.content._create (diskoLib.deviceNumbering dev config.index))}
'';
};