Ask for a different disk if not found
This commit is contained in:
parent
9d045f40f0
commit
9844355048
1 changed files with 20 additions and 2 deletions
|
@ -161,8 +161,26 @@
|
|||
if osDisk && config.devicePath == null then ''
|
||||
${diskSelector}
|
||||
''
|
||||
else
|
||||
"local ${diskVarName}=${config.devicePath}"}
|
||||
else ''
|
||||
local ${diskVarName}=${config.devicePath}
|
||||
${if osDisk then ''
|
||||
. ${./../../../scripts/Common/Scripts/is-truthy.sh}
|
||||
if [ ! -b ${diskVar} ]; then
|
||||
function fallback() {
|
||||
echo "Couldn't find the specified disk \"${diskVar}\"."
|
||||
echo "Do you want to install the OS on another disk?"
|
||||
local answer
|
||||
read answer
|
||||
if isTruthy "$answer"; then
|
||||
${diskSelector}
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
fallback;
|
||||
fi
|
||||
'' else ""}
|
||||
''}
|
||||
|
||||
${if (!config.wipe) then cleanup else ""}
|
||||
|
||||
|
|
Loading…
Reference in a new issue