card-helpers.inc: Output a better default message for card part case

Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
This commit is contained in:
Andreas Müller
2018-10-10 17:53:17 +02:00
parent df84197a3f
commit 4f112d1c41

View File

@@ -245,7 +245,11 @@ RunUserStartRoot() {
echo "${style_bold}${style_red}IMPORTANT: THIS is YOUR LAST EXIT...${style_normal}"
if [ "x$1" = "x" ] ; then
# No message text passed: use standard
echo "${style_bold}All data on $DevicePath will be overwritten by $DeployedFile${style_normal}"
if [ -n "$DeployedFile" ]; then
echo "${style_bold}All data on $DevicePath will be overwritten by $DeployedFile${style_normal}"
else
echo "${style_bold}All data on $DevicePath will be erased${style_normal}"
fi
else
# Use message text passed
echo $1 | sed "s|\%DevicePath\%|$DevicePath|" | sed "s|\%DeployedFile\%|$DeployedFile|"