# HG changeset patch # User Dominique Corbex # Date 1392241565 -3600 # Node ID ed27ddc7f1763073fa450ad10dec6cf81340fbf5 # Parent 5b960183f9d5cb72d66b1678aaeb13ca3cbc4a66 fix #109 grub install fails diff -r 5b960183f9d5 -r ed27ddc7f176 installer.cgi --- a/installer.cgi Wed Jan 15 18:30:23 2014 -0200 +++ b/installer.cgi Wed Feb 12 22:46:05 2014 +0100 @@ -11,7 +11,7 @@ # restricted path PATH="/usr/sbin:/usr/bin:/sbin:/bin" -VERSION=3.94 +VERSION=3.95 # Common functions from libtazpanel . lib/libtazpanel @@ -263,10 +263,10 @@ select "$(/usr/sbin/tazinst list uuid "$INSTFILE")" \ "$root_uuid" \ "ROOT_UUID" \ - 2 + 0 error_msg "$error" \ "root_uuid" \ - 2 + 0 br } @@ -295,7 +295,7 @@ select "$(/usr/sbin/tazinst list uuid "$INSTFILE")" \ "$home_uuid" \ "HOME_UUID" \ - 2 + 0 br } @@ -421,7 +421,7 @@ { if [ "$CHECK" ]; then echo '' - p $(gettext "Errors found. Please check your settings.") + p "$(gettext "Errors found. Please check your settings.")" echo '' fi } @@ -1051,8 +1051,9 @@ if ! (/usr/sbin/tazinst check all $INSTFILE > /dev/null); then page_redirection "input&CHECK=yes" else - tazinst_run && moveto_page home reboot \ - || moveto_page input failed +# tazinst_run && moveto_page home reboot \ +# || moveto_page input failed + moveto_page input failed fi form_end ;; diff -r 5b960183f9d5 -r ed27ddc7f176 slitaz-installer --- a/slitaz-installer Wed Jan 15 18:30:23 2014 -0200 +++ b/slitaz-installer Wed Feb 12 22:46:05 2014 +0100 @@ -12,7 +12,7 @@ TAZINST_REQUIRED_VERSION="2.98" BACKLIST="SliTaz GNU/Linux installer" DIALOG=dialog -VERSION="3.94" +VERSION="3.95" #-------------- # msgs section @@ -322,8 +322,8 @@ --title " Select $option " \ --backtitle "$BACKLIST" \ --default-item "$(tazinst get "$option")" \ - --ok-label "$(gettext "Ok")" \ - --cancel-label "$(gettext "Cancel")" \ + --ok-label "$(gettext "Next")" \ + --cancel-label "$(gettext "Back")" \ --menu "$(msg $option)" 18 70 6 $items 2> "$tempfile" retval="$?" choice=$(cat "$tempfile") @@ -350,7 +350,7 @@ --title " Select $option " \ --backtitle "$BACKLIST" \ --ok-label "$(gettext "Yes")" \ - --cancel-label "$(gettext "Cancel")" \ + --cancel-label "$(gettext "Back")" \ --extra-button --extra-label "$(gettext "No")" \ --yesno "$(ask $option)" 18 70 retval="$?" @@ -376,8 +376,8 @@ $DIALOG \ --clear --colors \ --title " Select $option " \ - --ok-label "$(gettext "Ok")" \ - --cancel-label "$(gettext "Cancel")" \ + --ok-label "$(gettext "Next")" \ + --cancel-label "$(gettext "Back")" \ --inputbox "$(msg $option)" 16 51 "$value" 2> "$tempfile" retval="$?" choice="$(cat $tempfile)" @@ -416,7 +416,8 @@ 0) # yes move up ;; 1) # Cancel - move back ;; + gettext "Slitaz install cancelled."; echo + exit 1 ;; 3) # no return 3 ;; 255)# ESC pressed diff -r 5b960183f9d5 -r ed27ddc7f176 tazinst --- a/tazinst Wed Jan 15 18:30:23 2014 -0200 +++ b/tazinst Wed Feb 12 22:46:05 2014 +0100 @@ -33,7 +33,7 @@ [ -r /etc/slitaz/tazinst.conf ] && . /etc/slitaz/tazinst.conf # version -readonly VERSION=3.94 +readonly VERSION=3.95 # i18n . /usr/bin/gettext.sh @@ -897,19 +897,19 @@ # list partitions list_uuid() { - /sbin/blkid | sort | /bin/busybox awk ' - /UUID/ { - UUID=substr($0,index($0,"UUID=")) - UUID=substr(UUID,1,index(UUID,"\" ")) - gsub(/"/,"",UUID) - DEV=substr($1,1,index($1,":")-1) - printf "%s %s\n", UUID, DEV - }' + # list all drives but cdroms + /sbin/blkid -o export| /bin/busybox awk ' + BEGIN{FS="="} + /DEVNAME/{dev=$2, type="unknown", label=""} + /LABEL/{label=$2" "} + /TYPE/{type=$2} + /PARTUUID/{if (type != "iso9660"){ + printf "%s %s(%s)\n", dev, label, type}}' | sort -k 2 } list_partition_table() { - /usr/sbin/parted -lm 2>&1 | \ + /usr/sbin/parted -lms 2>&1 | \ /bin/busybox awk -F: '/^\/dev\//{printf "%s: %s\n", $1,$6}' } @@ -938,7 +938,7 @@ # list Windows partitions list_winboot() { - /usr/sbin/parted -lm 2>&1 | /bin/busybox awk ' + /usr/sbin/parted -lms 2>&1 | /bin/busybox awk ' BEGIN{ FS=":" disknum=-1 @@ -1087,7 +1087,7 @@ { local uuid="$1" device device="$(uuid2disk $uuid)" - printf "%s" "$(/usr/sbin/parted -lm 2>&1 | grep "$device" | \ + printf "%s" "$(/usr/sbin/parted -lms 2>&1 | grep "$device" | \ cut -d':' -f6)" } @@ -1499,7 +1499,7 @@ { local partition="$(uuid2dev $1)" partition="${partition%[0-9]}" - /usr/sbin/parted -lm 2>&1 | grep "^/dev" | \ + /usr/sbin/parted -lms 2>&1 | grep "^/dev" | \ /bin/busybox awk -v PART="$partition" '{if (match($0,PART)) print NR-1}' } @@ -1908,7 +1908,7 @@ # add root device to CHECK_FS in rcS.conf to check filesystem # on each boot. log "$(gettext "Adding / partition and CHECK_FS to file /etc/rcS.conf...")" - sed -i s#'CHECK_FS=\"\"'#"CHECK_FS=\"$ROOT_UUID\""# etc/rcS.conf + sed -i s#'CHECK_FS=\"\"'#"CHECK_FS=\"$(dev2uuid $ROOT_UUID)\""# etc/rcS.conf # set hostname. log "$(gettext "Configuring host name:") $HOSTNAME" printf "%s\n" "$HOSTNAME" > etc/hostname