summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJörg Thalheim <Mic92@users.noreply.github.com>2022-09-12 22:15:58 +0200
committerGitHub <noreply@github.com>2022-09-12 22:15:58 +0200
commitc3da181593872cc1af14883d394ee0a01dd43a13 (patch)
tree8c4c832933eba27fae3211bb2c43eec4163a49ee
parent0d3295fcffd67af667296ca20b306dd306a9bd28 (diff)
parent48e250464db3abe707312390cafb7f57376ebc2f (diff)
Merge pull request #40 from moduon/refresh-after-partitioning
fix: mkfs randomly not detecting just partitioned device
-rw-r--r--types.nix2
1 files changed, 2 insertions, 0 deletions
diff --git a/types.nix b/types.nix
index 555b483..836a7fb 100644
--- a/types.nix
+++ b/types.nix
@@ -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))}
'';
};