--- trunk/installer-simple/bin/installer.sh.in 2014/01/08 10:36:44 2483 +++ trunk/installer-simple/bin/installer.sh.in 2014/01/08 12:11:44 2487 @@ -100,6 +100,30 @@ return 0 } +mount_rootfs() +{ + local retval + + if is_mounted --location "${INSTALLROOT}" + then + echo $"${INSTALLROOT} already mounted" >&2 + else + mount "${ROOTHDD}" "${INSTALLROOT}" || dialog_die $"Could not mount rootfs - drive'${ROOTHDD}' -> '${INSTALLROOT}'" + fi + [[ -d ${INSTALLROOT}/boot ]] || install -d ${INSTALLROOT}/boot +} + +umount_rootfs() +{ + is_mounted --location ${INSTALLROOT}/boot && umount ${INSTALLROOT}/boot + is_mounted --location ${INSTALLROOT} && umount ${INSTALLROOT} +} + +install_do_reboot() +{ + reboot +} + run_hardware_detection() { local hwinfo @@ -262,12 +286,6 @@ mkfs."${FORMAT_FILESYSTEM}" -q "${ROOTHDD}" || dialog_die } -install_mount_rootfs() -{ - is_mounted --location "${INSTALLROOT}" || mount "${ROOTHDD}" "${INSTALLROOT}" - install -d ${INSTALLROOT}/boot || dialog_die -} - install_system_image() { pushd ${INSTALLROOT} > /dev/null @@ -309,17 +327,6 @@ fi } -install_umount_rootfs() -{ - is_mounted --location ${INSTALLROOT}/boot && umount ${INSTALLROOT}/boot - is_mounted --location ${INSTALLROOT} && umount ${INSTALLROOT} -} - -install_do_reboot() -{ - reboot -} - ### installer dialogs ### @@ -482,7 +489,7 @@ task_setup_hdd_partitions_manual dialog_setup_hdd_format setup_hdd_format > /dev/null - install_mount_rootfs + mount_rootfs (install_system_image > /tmp/install.log) 2> /tmp/install_errors.log | install_meter | dialog_install_system_image dialog_install_settings @@ -499,7 +506,7 @@ bootloader_config bootloader_install - install_umount_rootfs + umount_rootfs dialog_install_successful } @@ -510,7 +517,7 @@ task_setup_hdd_partitions_auto dialog_setup_hdd_format setup_hdd_format > /dev/null - install_mount_rootfs + mount_rootfs (install_system_image > /tmp/install.log) 2> /tmp/install_errors.log | install_meter | dialog_install_system_image dialog_install_settings @@ -527,7 +534,7 @@ bootloader_config bootloader_install - install_umount_rootfs + umount_rootfs dialog_install_successful }