mirror of
https://github.com/dockur/windows.git
synced 2025-10-28 11:45:50 +00:00
fix: Check returnvalue
This commit is contained in:
parent
2f8c4e38a1
commit
2a9b310bca
1 changed files with 14 additions and 2 deletions
|
|
@ -257,6 +257,11 @@ finishInstall() {
|
||||||
local iso="$1"
|
local iso="$1"
|
||||||
local aborted="$2"
|
local aborted="$2"
|
||||||
|
|
||||||
|
if [ ! -s "$iso" ] || [ ! -f "$iso" ]; then
|
||||||
|
error "Failed to find ISO: $iso"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -w "$iso" ]; then
|
if [ -w "$iso" ]; then
|
||||||
# Mark ISO as prepared via magic byte
|
# Mark ISO as prepared via magic byte
|
||||||
if ! printf '\x16' | dd of="$iso" bs=1 seek=0 count=1 conv=notrunc status=none; then
|
if ! printf '\x16' | dd of="$iso" bs=1 seek=0 count=1 conv=notrunc status=none; then
|
||||||
|
|
@ -290,7 +295,11 @@ abortInstall() {
|
||||||
mv -f "$iso" "$STORAGE/$BASE"
|
mv -f "$iso" "$STORAGE/$BASE"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
finishInstall "$STORAGE/$BASE" "Y"
|
if ! finishInstall "$STORAGE/$BASE" "Y"; then
|
||||||
|
error "Failed to finish installation!"
|
||||||
|
exit 69
|
||||||
|
fi
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1185,7 +1194,10 @@ if ! buildImage "$DIR"; then
|
||||||
exit 65
|
exit 65
|
||||||
fi
|
fi
|
||||||
|
|
||||||
finishInstall "$STORAGE/$BASE" "N"
|
if ! finishInstall "$STORAGE/$BASE" "N"; then
|
||||||
|
error "Failed to finish installation!"
|
||||||
|
exit 69
|
||||||
|
fi
|
||||||
|
|
||||||
html "Successfully prepared image for installation..."
|
html "Successfully prepared image for installation..."
|
||||||
return 0
|
return 0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue