[arch-releng] [PATCH 06/10] Drop to recovery shell when mounting main media filesystem fails.

Gerardo Exequiel Pozzi vmlinuz386 at yahoo.com.ar
Wed Feb 17 17:45:28 EST 2010


Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386 at yahoo.com.ar>
---
 archiso/hooks/archiso |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/archiso/hooks/archiso b/archiso/hooks/archiso
index 7b4d756..aac2d21 100644
--- a/archiso/hooks/archiso
+++ b/archiso/hooks/archiso
@@ -85,16 +85,24 @@ archiso_mount_handler() {
         if mount -r -t "${FSTYPE}" ${archisodevice} /bootmnt > /dev/null 2>&1; then
             if [ -e "${isomounts}" ]; then
                 echo "SUCCESS: Mounted archiso volume successfully."
+                fserror="0"
             else
                 echo "ERROR: Mounting was successful, but the ${isomounts} file does not exist."
-                exit 1
+                fserror="1"
             fi
         else
             echo "ERROR; Failed to mount ${archisodevice} (FS is ${FSTYPE})"
-            exit 1
+            fserror="1"
         fi
     else
         echo "ERROR: ${archisodevice} found, but the filesystem type is unknown."
+        fserror="1"
+    fi
+
+    if [ "${fserror}" = "1" ]; then
+        echo "   Falling back to interactive prompt"
+        echo "   You can try to fix the problem manually, log out when you are finished"
+        launch_interactive_shell
     fi
 
     msg ":: Mounting root (aufs) filesystem"
-- 
1.6.6.1




More information about the arch-releng mailing list