Format and label disks properly

This commit is contained in:
Manuel Thalmann 2024-06-22 21:52:20 +02:00
parent 1588c525c6
commit ae80b428f0

View file

@ -129,8 +129,15 @@
(if keepExisting then fallback else create) (if keepExisting then fallback else create)
''local diskPath="$(find -L /dev/disk/by-diskseq -samefile ${diskVar})"'' ''local diskPath="$(find -L /dev/disk/by-diskseq -samefile ${diskVar})"''
''local ${partVarName}="$diskPath-part${toString index}"'' ''local ${partVarName}="$diskPath-part${toString index}"''
formatScripts.${format} # Wait for partition to be detected
(labelScripts.${format} label) ''
while true;
do
[ -b ${partVar} ] && break;
done;
''
"sudo ${formatScripts.${format}}"
"sudo ${labelScripts.${format} label}"
]) ])
partitions) partitions)
); );