diff -Nru boot-repair-4ppa37/debian/changelog boot-repair-4ppa40/debian/changelog --- boot-repair-4ppa37/debian/changelog 2016-04-26 23:00:08.000000000 +0000 +++ boot-repair-4ppa40/debian/changelog 2016-11-18 01:13:27.000000000 +0000 @@ -1,5 +1,5 @@ -boot-repair (4ppa37) xenial; urgency=low +boot-repair (4ppa40) xenial; urgency=low * Sources creation - -- Yann MRN Thu, 25 Dec 2015 15:14:14 +0200 + -- Yann MRN Thu, 17 Nov 2016 15:14:14 +0200 diff -Nru boot-repair-4ppa37/usr/share/boot-sav/boot-repair-actions.sh boot-repair-4ppa40/usr/share/boot-sav/boot-repair-actions.sh --- boot-repair-4ppa37/usr/share/boot-sav/boot-repair-actions.sh 2016-04-26 22:09:48.000000000 +0000 +++ boot-repair-4ppa40/usr/share/boot-sav/boot-repair-actions.sh 2016-06-15 23:04:10.000000000 +0000 @@ -94,8 +94,7 @@ #fsck -fyM # repair partitions detected in the /etc/fstab except those mounted for ((i=1;i<=NBOFPARTITIONS;i++)); do echo "SET@_label0.set_text('''$Repair_file_systems ${LISTOFPARTITIONS[$i]}. $This_may_require_several_minutes''')" - temp="$(fdisk -l | grep "/dev/${LISTOFPARTITIONS[$i]} " )" - if [[ "$(grep -i NTFS <<< "$temp" )" ]];then + if [[ "$(echo "$BLKID" | grep ntfs | grep "${LISTOFPARTITIONS[$i]}:" )" ]];then [[ ! "$(type -p $FILETOTEST)" ]] && installpackagelist [[ "$(type -p $FILETOTEST)" ]] && echo " ntfsfix /dev/${LISTOFPARTITIONS[$i]}" \ diff -Nru boot-repair-4ppa37/usr/share/boot-sav/boot-repair-gui.sh boot-repair-4ppa40/usr/share/boot-sav/boot-repair-gui.sh --- boot-repair-4ppa37/usr/share/boot-sav/boot-repair-gui.sh 2014-11-22 03:52:32.000000000 +0000 +++ boot-repair-4ppa40/usr/share/boot-sav/boot-repair-gui.sh 2016-06-15 22:51:38.000000000 +0000 @@ -1,5 +1,5 @@ #! /bin/bash -# Copyright 2013 Yann MRN +# Copyright 2016 Yann MRN # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published diff -Nru boot-repair-4ppa37/usr/share/boot-sav/bs-common.sh boot-repair-4ppa40/usr/share/boot-sav/bs-common.sh --- boot-repair-4ppa37/usr/share/boot-sav/bs-common.sh 2014-12-31 14:55:26.000000000 +0000 +++ boot-repair-4ppa40/usr/share/boot-sav/bs-common.sh 2016-11-17 23:49:25.000000000 +0000 @@ -1,5 +1,5 @@ #! /bin/bash -# Copyright 2013 Yann MRN +# Copyright 2010-2016 Yann MRN # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published @@ -395,7 +395,9 @@ MOUNTCODE="$?" if [[ "$MOUNTCODE" != 0 ]];then echo "mount -r /dev/${LISTOFPARTITIONS[$i]} : Error code $MOUNTCODE" - MOUNTERROR="$MOUNTCODE" #http://ubuntuforums.org/showthread.php?t=2068280 + if [[ "$(echo "$BLKID" | grep ext | grep "${LISTOFPARTITIONS[$i]}:" )" ]];then + MOUNTERROR="$MOUNTCODE" #http://ubuntuforums.org/showthread.php?t=2068280 + fi fi fi fi diff -Nru boot-repair-4ppa37/usr/share/boot-sav/bs-init.sh boot-repair-4ppa40/usr/share/boot-sav/bs-init.sh --- boot-repair-4ppa37/usr/share/boot-sav/bs-init.sh 2014-11-25 21:22:57.000000000 +0000 +++ boot-repair-4ppa40/usr/share/boot-sav/bs-init.sh 2016-06-15 22:51:39.000000000 +0000 @@ -1,5 +1,5 @@ #! /bin/bash -# Copyright 2014 Yann MRN +# Copyright 2016 Yann MRN # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published diff -Nru boot-repair-4ppa37/usr/share/boot-sav/gui-actions-purge.sh boot-repair-4ppa40/usr/share/boot-sav/gui-actions-purge.sh --- boot-repair-4ppa37/usr/share/boot-sav/gui-actions-purge.sh 2014-12-23 23:12:05.000000000 +0000 +++ boot-repair-4ppa40/usr/share/boot-sav/gui-actions-purge.sh 2016-11-18 00:51:08.000000000 +0000 @@ -1,5 +1,5 @@ #! /bin/bash -# Copyright 2013 Yann MRN +# Copyright 2011-2016 Yann MRN # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published @@ -13,6 +13,7 @@ # You should have received a copy of the GNU General Public License along # with this program. If not, see . + ####################### PURGE GRUB ##################################### grub_purge() { SEVERALCOMMANDS="" @@ -381,6 +382,7 @@ fi } + purge_cancelled() { #when [[ ! "$VALIDSOURCE" ]] or [[ "$DEBCHECK" = debNG ]] PACKKK=$1 #linux or $GRUBPACKAGE @@ -435,10 +437,10 @@ } then_type_this_linux_install_command() { -[[ "$GRUBPACKAGE" =~ signed ]] && KERNELTOREINST=signed || KERNELTOREINST="" +[[ "$GRUBPACKAGE" =~ signed ]] && KERNELTOREINST="-signed" || KERNELTOREINST="" #[[ -d "${BLKIDMNT_POINT[$REGRUB_PART]}/boot" ]] && echo "Regenerated ${BLKIDMNT_POINT[$REGRUB_PART]}/boot folder" echo "SET@_label0.set_text('''$Purge_and_reinstall_kernels ${LISTOFPARTITIONS[$REGRUB_PART]} (ins). $This_may_require_several_minutes''')" -local COMMAND="${APTTYP[$USRPART]} ${INSTALLTYP[$USRPART]} ${YESTYP[$USRPART]} linux${$KERNELTOREINST}-generic linux-headers-generic" +local COMMAND="${APTTYP[$USRPART]} ${INSTALLTYP[$USRPART]} ${YESTYP[$USRPART]} linux${KERNELTOREINST}-generic linux-headers-generic" #if [[ "${APTTYP[$REGRUB_PART]}" = apt-get ]];then # echo "SET@_label8.set_text('''$Now_please_type_this_command_in_the_terminal''')" # echo "SET@_label9.set_text('''sudo ${CHROOTUSR}$COMMAND''')" diff -Nru boot-repair-4ppa37/usr/share/boot-sav/gui-scan.sh boot-repair-4ppa40/usr/share/boot-sav/gui-scan.sh --- boot-repair-4ppa37/usr/share/boot-sav/gui-scan.sh 2015-12-23 09:17:55.000000000 +0000 +++ boot-repair-4ppa40/usr/share/boot-sav/gui-scan.sh 2016-11-17 23:24:43.000000000 +0000 @@ -1,5 +1,5 @@ #! /bin/bash -# Copyright 2014 Yann MRN +# Copyright 2010-2016 Yann MRN # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published @@ -13,6 +13,7 @@ # You should have received a copy of the GNU General Public License along # with this program. If not, see . + ##################### Main function for GUI preparation ################ check_os_and_mount_blkid_partitions_gui() { update_translations diff -Nru boot-repair-4ppa37/usr/share/boot-sav/gui-tab-main.sh boot-repair-4ppa40/usr/share/boot-sav/gui-tab-main.sh --- boot-repair-4ppa37/usr/share/boot-sav/gui-tab-main.sh 2015-01-05 23:41:58.000000000 +0000 +++ boot-repair-4ppa40/usr/share/boot-sav/gui-tab-main.sh 2016-06-15 22:51:39.000000000 +0000 @@ -1,5 +1,5 @@ #! /bin/bash -# Copyright 2015 Yann MRN +# Copyright 2016 Yann MRN # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published @@ -65,7 +65,7 @@ set_easy_repair_diff_br_and_bi() { if [[ "$QTY_OF_PART_FOR_REINSTAL" = 0 ]] && [[ "$NB_MBR_CAN_BE_RESTORED" = 0 ]] && [[ "$(grep BYT <<< "$PARTEDLM" )" ]] \ || [[ "$ROOTDISKMISSING" ]] || [[ "$MOUNTERROR" ]];then - FSCK_ACTION=repair-filesystems; echo 'SET@_checkbutton_repairfilesystems.set_active(True)' #Works: http://paste2.org/p/2481100 + FSCK_ACTION=repair-filesystems; echo 'SET@_checkbutton_repairfilesystems.set_active(True)' else FSCK_ACTION=""; echo 'SET@_checkbutton_repairfilesystems.set_active(False)' fi diff -Nru boot-repair-4ppa37/usr/share/boot-sav/gui-tab-mbr.sh boot-repair-4ppa40/usr/share/boot-sav/gui-tab-mbr.sh --- boot-repair-4ppa37/usr/share/boot-sav/gui-tab-mbr.sh 2014-12-17 01:04:37.000000000 +0000 +++ boot-repair-4ppa40/usr/share/boot-sav/gui-tab-mbr.sh 2016-11-18 00:20:04.000000000 +0000 @@ -151,10 +151,10 @@ } order_primary_partitions_of_tmpdisk() { -local loop2 opi ADDPART ADDTMPNAME tpdk="${LISTOFDISKS[$TMPDISK]}" +local loop2 opi opj ADDPART ADDTMPNAME tpdk="${LISTOFDISKS[$TMPDISK]}" # called by fill_combobox_partition_booted_bymbr and fillin_bootflag_combobox QTY_PRIMPART=0 -for loop2 in 1 2 3 4 5 6 7 8 9 10 11 12;do +for loop2 in 1 2 3 4 5 6 7 8 9 10 11 12 13 14;do for ((opi=NBOFPARTITIONS;opi>=1;opi--)); do #To put Recovery after Windows (exceptions: http://paste.ubuntu.com/884745) ADDPART=""; ADDTMPNAME="" if ( [[ "${LISTOFPARTITIONS[$opi]}" = "${tpdk}1" ]] || [[ "${LISTOFPARTITIONS[$opi]}" = "${tpdk}2" ]] \ @@ -172,9 +172,10 @@ add_part_to_primpart done done +primparttmp=$QTY_PRIMPART for ((opi=NBOFPARTITIONS;opi>=1;opi--)); do ADDPART=yes; ADDTMPNAME="" - for ((opj=QTY_PRIMPART;opj>=1;opj--)); do + for ((opj=primparttmp;opj>=1;opj--)); do [[ "${PRIMPART[$opj]}" = "$opi" ]] && ADDPART="" done add_part_to_primpart @@ -198,7 +199,7 @@ if [[ "$ADDPART" ]] && [[ "${LISTOFPARTITIONS[$opi]}" != "$OS_TO_DELETE_PARTITION" ]];then (( QTY_PRIMPART += 1 )) [[ "${PART_WITH_OS[$opi]}" = is-os ]] && ADDTMPNAME=" (${OSNAME[$opi]})" - PRIMPART[$QTY_PRIMPART]="$opi" #eg ${LISTOFPARTITIONS[FLAGPART[a]]}= sda3 + PRIMPART[$QTY_PRIMPART]="$opi" #eg ${LISTOFPARTITIONS[PRIMPART[a]]}= sda3 PRIMPARTNAME[$QTY_PRIMPART]="${LISTOFPARTITIONS[$opi]}$ADDTMPNAME" #eg sda3 (XP) fi } diff -Nru boot-repair-4ppa37/usr/share/boot-sav/gui-tab-other.sh boot-repair-4ppa40/usr/share/boot-sav/gui-tab-other.sh --- boot-repair-4ppa37/usr/share/boot-sav/gui-tab-other.sh 2016-04-26 22:09:08.000000000 +0000 +++ boot-repair-4ppa40/usr/share/boot-sav/gui-tab-other.sh 2016-11-17 23:48:51.000000000 +0000 @@ -1,5 +1,5 @@ #! /bin/bash -# Copyright 2016 Yann MRN +# Copyright 2010-2016 Yann MRN # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published @@ -102,7 +102,7 @@ } -########################################## BOOTFLAG +########################################## BOOTFLAG #################### fillin_bootflag_combobox() { local loop disk p q TMPDISK fbfc fichier QTY_FLAGPART=0 @@ -127,18 +127,19 @@ fi } + bootflag_update() { if [[ "$QTY_FLAGPART" != 0 ]];then echo 'SET@_combobox_bootflag.set_active(0)'; BOOTFLAG_TO_USE="${FLAGPART[1]}" echo "[debug]BOOTFLAG_TO_USE is : ${LISTOFPARTITIONS[$BOOTFLAG_TO_USE]}" fi -if [[ "$GRUBPACKAGE" =~ efi ]] && [[ "$MBR_ACTION" = reinstall ]] || [[ "$MBR_ACTION" = restore ]] || [[ "$QTY_FLAGPART" = 0 ]];then +if [[ "$QTY_FLAGPART" = 0 ]];then #[[ "$GRUBPACKAGE" =~ efi ]] && [[ "$MBR_ACTION" = reinstall ]] || [[ "$MBR_ACTION" = restore ]] || echo 'SET@_hbox_bootflag.set_sensitive(False)' else echo 'SET@_hbox_bootflag.set_sensitive(True)' fi -if [[ "$GRUBPACKAGE" =~ efi ]] && [[ "$MBR_ACTION" = reinstall ]] || [[ "$NB_BISEFIPART" != 0 ]] \ -|| [[ "$MBR_ACTION" = restore ]] || [[ "$QTY_FLAGPART" = 0 ]];then +# https://forum.ubuntu-fr.org/viewtopic.php?id=1999956 +if [[ "$MBR_ACTION" = reinstall ]] || [[ "$NB_BISEFIPART" != 0 ]] || [[ "$MBR_ACTION" = restore ]] || [[ "$QTY_FLAGPART" = 0 ]];then unset_bootflag echo 'SET@_checkbutton_bootflag.set_active(False)' else