--- trunk/installer-simple/bin/installer.sh.in 2014/01/07 13:20:20 2404 +++ trunk/installer-simple/bin/installer.sh.in 2014/01/07 13:27:16 2409 @@ -72,6 +72,18 @@ # DIALOG BOXEN # ################################################# +trap_exit() +{ + is_mounted --location "${INSTALLROOT}/dev" && umount ${INSTALLROOT}/dev + is_mounted --location "${INSTALLROOT}/proc" && umount ${INSTALLROOT}/proc + is_mounted --location "${INSTALLROOT}/sys" && umount ${INSTALLROOT}/sys + is_mounted --location "${INSTALLROOT}/boot" && umount ${INSTALLROOT}/boot + is_mounted --location "${INSTALLROOT}" && umount ${INSTALLROOT} + + echo $"Installation aborted." + exit 1 +} + dialog_die() { ERROR="$1" @@ -863,6 +875,9 @@ dialog_install_successful } +# set some proper traps +trap "trap_exit" SIGINT SIGQUIT + dialog_main exit 0