tazinst rev 28

fix #109 grub install fails
author Dominique Corbex <domcox@slitaz.org>
date Wed Feb 12 22:46:05 2014 +0100 (2014-02-12)
parents 5b960183f9d5
children a0bb82fa1e38
files installer.cgi slitaz-installer tazinst
line diff
     1.1 --- a/installer.cgi	Wed Jan 15 18:30:23 2014 -0200
     1.2 +++ b/installer.cgi	Wed Feb 12 22:46:05 2014 +0100
     1.3 @@ -11,7 +11,7 @@
     1.4  # restricted path
     1.5  PATH="/usr/sbin:/usr/bin:/sbin:/bin"
     1.6  
     1.7 -VERSION=3.94
     1.8 +VERSION=3.95
     1.9  
    1.10  # Common functions from libtazpanel
    1.11  . lib/libtazpanel
    1.12 @@ -263,10 +263,10 @@
    1.13  	select "$(/usr/sbin/tazinst list uuid "$INSTFILE")" \
    1.14  		"$root_uuid" \
    1.15  		"ROOT_UUID" \
    1.16 -		2
    1.17 +		0
    1.18  	error_msg "$error" \
    1.19  		"root_uuid" \
    1.20 -		2
    1.21 +		0
    1.22  	br
    1.23  }
    1.24  
    1.25 @@ -295,7 +295,7 @@
    1.26  	select "$(/usr/sbin/tazinst list uuid "$INSTFILE")" \
    1.27  		"$home_uuid" \
    1.28  		"HOME_UUID" \
    1.29 -		2
    1.30 +		0
    1.31  	br
    1.32  }
    1.33  
    1.34 @@ -421,7 +421,7 @@
    1.35  {
    1.36  	if [ "$CHECK" ]; then
    1.37  		echo '<span class="alert">'
    1.38 -		p $(gettext "Errors found. Please check your settings.")
    1.39 +		p "$(gettext "Errors found. Please check your settings.")"
    1.40  		echo '</span>'
    1.41  	fi
    1.42  }
    1.43 @@ -1051,8 +1051,9 @@
    1.44  		if ! (/usr/sbin/tazinst check all $INSTFILE > /dev/null); then
    1.45  			page_redirection "input&CHECK=yes"
    1.46  		else
    1.47 -			tazinst_run && moveto_page home reboot \
    1.48 -						|| moveto_page input failed
    1.49 +#			tazinst_run && moveto_page home reboot \
    1.50 +#						|| moveto_page input failed
    1.51 +					 moveto_page input failed
    1.52  		fi
    1.53  		form_end
    1.54  		;;
     2.1 --- a/slitaz-installer	Wed Jan 15 18:30:23 2014 -0200
     2.2 +++ b/slitaz-installer	Wed Feb 12 22:46:05 2014 +0100
     2.3 @@ -12,7 +12,7 @@
     2.4  TAZINST_REQUIRED_VERSION="2.98"
     2.5  BACKLIST="SliTaz GNU/Linux installer"
     2.6  DIALOG=dialog
     2.7 -VERSION="3.94"
     2.8 +VERSION="3.95"
     2.9  
    2.10  #--------------
    2.11  # msgs section
    2.12 @@ -322,8 +322,8 @@
    2.13  		--title " Select $option " \
    2.14  		--backtitle "$BACKLIST" \
    2.15  		--default-item "$(tazinst get "$option")" \
    2.16 -		--ok-label "$(gettext "Ok")" \
    2.17 -		--cancel-label "$(gettext "Cancel")" \
    2.18 +		--ok-label "$(gettext "Next")" \
    2.19 +		--cancel-label "$(gettext "Back")" \
    2.20  		--menu "$(msg $option)" 18 70 6 $items 2> "$tempfile"
    2.21  	retval="$?"
    2.22  	choice=$(cat "$tempfile")
    2.23 @@ -350,7 +350,7 @@
    2.24  		--title " Select $option " \
    2.25  		--backtitle "$BACKLIST" \
    2.26  		--ok-label "$(gettext "Yes")" \
    2.27 -		--cancel-label "$(gettext "Cancel")" \
    2.28 +		--cancel-label "$(gettext "Back")" \
    2.29  		--extra-button --extra-label "$(gettext "No")" \
    2.30  		--yesno "$(ask $option)" 18 70
    2.31  	retval="$?"
    2.32 @@ -376,8 +376,8 @@
    2.33  	$DIALOG \
    2.34  		--clear --colors \
    2.35  		--title " Select $option " \
    2.36 -		--ok-label "$(gettext "Ok")" \
    2.37 -		--cancel-label "$(gettext "Cancel")" \
    2.38 +		--ok-label "$(gettext "Next")" \
    2.39 +		--cancel-label "$(gettext "Back")" \
    2.40          --inputbox "$(msg $option)" 16 51 "$value"  2> "$tempfile"
    2.41  	retval="$?"
    2.42  	choice="$(cat $tempfile)"
    2.43 @@ -416,7 +416,8 @@
    2.44  		0)	# yes
    2.45  			move up ;;
    2.46  		1)	# Cancel
    2.47 -			move back ;;
    2.48 +			gettext "Slitaz install cancelled."; echo
    2.49 +			exit 1 ;;
    2.50  		3)	# no
    2.51  			return 3 ;;
    2.52  		255)# ESC pressed
     3.1 --- a/tazinst	Wed Jan 15 18:30:23 2014 -0200
     3.2 +++ b/tazinst	Wed Feb 12 22:46:05 2014 +0100
     3.3 @@ -33,7 +33,7 @@
     3.4  [ -r /etc/slitaz/tazinst.conf ] && . /etc/slitaz/tazinst.conf
     3.5  
     3.6  # version
     3.7 -readonly VERSION=3.94
     3.8 +readonly VERSION=3.95
     3.9  
    3.10  # i18n
    3.11  . /usr/bin/gettext.sh
    3.12 @@ -897,19 +897,19 @@
    3.13  # list partitions
    3.14  list_uuid()
    3.15  {
    3.16 -	/sbin/blkid | sort | /bin/busybox awk '
    3.17 -		/UUID/ {
    3.18 -			UUID=substr($0,index($0,"UUID="))
    3.19 -			UUID=substr(UUID,1,index(UUID,"\" "))
    3.20 -			gsub(/"/,"",UUID)
    3.21 -			DEV=substr($1,1,index($1,":")-1)
    3.22 -			printf "%s %s\n", UUID, DEV
    3.23 -		}'
    3.24 +	# list all drives but cdroms
    3.25 +	/sbin/blkid -o export| /bin/busybox awk '
    3.26 +		BEGIN{FS="="}
    3.27 +		/DEVNAME/{dev=$2, type="unknown", label=""}
    3.28 +		/LABEL/{label=$2" "}
    3.29 +		/TYPE/{type=$2}
    3.30 +		/PARTUUID/{if (type != "iso9660"){
    3.31 +			printf "%s %s(%s)\n", dev, label, type}}' | sort -k 2
    3.32  }
    3.33  
    3.34  list_partition_table()
    3.35  {
    3.36 -	/usr/sbin/parted -lm 2>&1 | \
    3.37 +	/usr/sbin/parted -lms 2>&1 | \
    3.38  		/bin/busybox awk -F: '/^\/dev\//{printf "%s: %s\n", $1,$6}'
    3.39  }
    3.40  
    3.41 @@ -938,7 +938,7 @@
    3.42  # list Windows partitions
    3.43  list_winboot()
    3.44  {
    3.45 -	/usr/sbin/parted -lm 2>&1 | /bin/busybox awk '
    3.46 +	/usr/sbin/parted -lms 2>&1 | /bin/busybox awk '
    3.47  	BEGIN{
    3.48  		FS=":"
    3.49  		disknum=-1
    3.50 @@ -1087,7 +1087,7 @@
    3.51  {
    3.52  	local uuid="$1" device
    3.53  	device="$(uuid2disk $uuid)"
    3.54 -	printf "%s" "$(/usr/sbin/parted -lm 2>&1 | grep "$device" | \
    3.55 +	printf "%s" "$(/usr/sbin/parted -lms 2>&1 | grep "$device" | \
    3.56  		cut -d':' -f6)"
    3.57  }
    3.58  
    3.59 @@ -1499,7 +1499,7 @@
    3.60  {
    3.61  	local partition="$(uuid2dev $1)"
    3.62  	partition="${partition%[0-9]}"
    3.63 -	/usr/sbin/parted -lm 2>&1 | grep "^/dev" | \
    3.64 +	/usr/sbin/parted -lms 2>&1 | grep "^/dev" | \
    3.65  		/bin/busybox awk -v PART="$partition" '{if (match($0,PART)) print NR-1}'
    3.66  }
    3.67  
    3.68 @@ -1908,7 +1908,7 @@
    3.69  	# add root device to CHECK_FS in rcS.conf to check filesystem
    3.70  	# on each boot.
    3.71  	log "$(gettext "Adding / partition and CHECK_FS to file /etc/rcS.conf...")"
    3.72 -	sed	-i s#'CHECK_FS=\"\"'#"CHECK_FS=\"$ROOT_UUID\""# etc/rcS.conf
    3.73 +	sed	-i s#'CHECK_FS=\"\"'#"CHECK_FS=\"$(dev2uuid $ROOT_UUID)\""# etc/rcS.conf
    3.74  	# set hostname.
    3.75  	log "$(gettext "Configuring host name:") $HOSTNAME"
    3.76  	printf "%s\n" "$HOSTNAME" > etc/hostname