summaryrefslogtreecommitdiffstats
path: root/src/cmd/installer-pc.sh
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2016-01-17 15:50:32 (EST)
committer P. J. McDermott <pj@pehjota.net>2016-01-17 15:50:32 (EST)
commit6736b550f112f14c17401329a6a2a63ddc53e68b (patch)
tree68e54ba4a7879189faaf3756cdd56c444eeb0b7d /src/cmd/installer-pc.sh
parent9add17a7f4a24fe04a7a93782e51ce710d7e371e (diff)
cmd/*: Check return value of session_begin()
Also clean up on error now.
Diffstat (limited to 'src/cmd/installer-pc.sh')
-rw-r--r--src/cmd/installer-pc.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cmd/installer-pc.sh b/src/cmd/installer-pc.sh
index a96a7cf..348838e 100644
--- a/src/cmd/installer-pc.sh
+++ b/src/cmd/installer-pc.sh
@@ -86,7 +86,10 @@ cmd_installer_pc_main()
EOF
# This ln command won't be needed once lilo 24.1-1 is uploaded.
ln "${root}/boot/vmlinuz" "${root}/boot/vmlinuz.old"
- session_begin "${root}" . : false
+ if ! session_begin "${root}" . : false
+ block_umount "${root}"
+ return 2
+ fi
session_exec install-lilo \
"${dev}" "PARTUUID=${b1}${b2}${b3}${b4}-01"
session_end