Commit 6adf48d0 authored by Gerardo Exequiel Pozzi's avatar Gerardo Exequiel Pozzi
Browse files

Call launch_interactive_shell in more cases of error.



A shell prompt is at least better than a kernel panic :)

Signed-off-by: default avatarGerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
parent 1bbeeb0e
...@@ -27,12 +27,20 @@ _mnt_squashfs() { ...@@ -27,12 +27,20 @@ _mnt_squashfs() {
if [ "${copytoram}" = "y" ]; then if [ "${copytoram}" = "y" ]; then
msg -n ":: Copying squashfs image to RAM..." msg -n ":: Copying squashfs image to RAM..."
/bin/cp "${img}" "/copytoram/${img_fullname}" /bin/cp "${img}" "/copytoram/${img_fullname}"
if [ $? -ne 0 ]; then
echo "ERROR: while copy ${img} to /copytoram/${img_fullname}"
launch_interactive_shell
fi
img="/copytoram/${img_fullname}" img="/copytoram/${img_fullname}"
msg "done." msg "done."
fi fi
mkdir -p "${tmp_mnt}" mkdir -p "${tmp_mnt}"
/bin/mount -r -t squashfs "${img}" "${tmp_mnt}" /bin/mount -r -t squashfs "${img}" "${tmp_mnt}"
if [ $? -ne 0 ]; then
echo "ERROR: while mounting ${img} to ${tmp_mnt}"
launch_interactive_shell
fi
if [ "/${mnt#/*/}" = "/" ]; then if [ "/${mnt#/*/}" = "/" ]; then
_mnt_aufs "${tmp_mnt}" "${mnt}" _mnt_aufs "${tmp_mnt}" "${mnt}"
...@@ -41,7 +49,7 @@ _mnt_squashfs() { ...@@ -41,7 +49,7 @@ _mnt_squashfs() {
fi fi
} }
run_hook () { run_hook() {
if [ "x${arch}" = "x" ]; then if [ "x${arch}" = "x" ]; then
arch="$(uname -m)" arch="$(uname -m)"
fi fi
...@@ -122,7 +130,7 @@ archiso_mount_handler() { ...@@ -122,7 +130,7 @@ archiso_mount_handler() {
/bin/mount -t aufs -o dirs=/rw_branch=rw none "${newroot}" /bin/mount -t aufs -o dirs=/rw_branch=rw none "${newroot}"
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "ERROR: while mounting root (aufs) filesystem." echo "ERROR: while mounting root (aufs) filesystem."
exit 1 launch_interactive_shell
fi fi
msg ":: Mounting images" msg ":: Mounting images"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment