Format and label disks properly
This commit is contained in:
parent
1588c525c6
commit
ae80b428f0
1 changed files with 9 additions and 2 deletions
|
@ -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)
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue