slitaz-tools rev 734

tazinst: fix: : Erreur 1 : mkfs. n'est pas install?
author Dominique Corbex <domcox@slitaz.org>
date Wed Apr 25 21:46:48 2012 +0200 (2012-04-25)
parents f1ba248d0b54
children e570520a6e4c
files installer/tazinst
line diff
     1.1 --- a/installer/tazinst	Thu Apr 19 08:42:38 2012 +0200
     1.2 +++ b/installer/tazinst	Wed Apr 25 21:46:48 2012 +0200
     1.3 @@ -339,10 +339,10 @@
     1.4  		btrfs|ext2|ext3|ext4|fat16|fat32|hfs|hfs+|jfs|ntfs|reiser4|reiserfs|ufs|xfs)
     1.5  			found=no
     1.6  			for xdir in /sbin /usr/sbin /usr/bin; do
     1.7 -				[ -x "$xdir/mkfs.$TGT_FS" ] && found=yes
     1.8 +				[ -x "$xdir/mkfs.$TGT_HOME_FS" ] && found=yes
     1.9  			done
    1.10  			if [ "$found" == "no" ]; then
    1.11 -				msg "$TGT_FS: mkfs.$TGT_FS $(gettext "is not installed")"; error=yes
    1.12 +				msg "$TGT_FS: mkfs.$TGT_HOME_FS $(gettext "is not installed")"; error=yes
    1.13  			fi ;;
    1.14  		*) msg "$TGT_HOME_FS: $(gettext "Unknown filesystem (/home)")"; error=yes ;;
    1.15  	esac
    1.16 @@ -774,39 +774,20 @@
    1.17  	debug "Searching for Windows"
    1.18  	if [ "$TGT_WINBOOT" == "auto" ];then
    1.19  		WINBOOT=$(fdisk -l | awk '
    1.20 -BEGIN{
    1.21 -	disk=-1
    1.22 -	found=0 
    1.23 -	winboot=""}
    1.24 +BEGIN{disk=-1,	found=-1,	winboot=""}
    1.25  {
    1.26 -	# Count disks
    1.27 -	if ($1=="Disk"){
    1.28 -		disk++
    1.29 -		part=-1
    1.30 -		dev=substr($2,6,3)
    1.31 -		# get removable status
    1.32 -		file="/sys/block/"dev"/removable"
    1.33 -		"cat " file | getline removable
    1.34 -		close("cat ")
    1.35 -}
    1.36 -	# Count partitions
    1.37 -	if (substr($1,1,4)=="/dev"){
    1.38 -		# List fixed drives only
    1.39 -		if (removable==0){
    1.40 -			part++
    1.41 -			# Read partition Id
    1.42 -	 		if ($2=="*"){Id=$6} else {Id=""}
    1.43 -			# Detect Windows Partition Type: 7,b,c,e,f
    1.44 -			WPT="[7bcef]"
    1.45 -			if (Id ~ WPT){
    1.46 -				found++
    1.47 -				# record 1st Windows partition found
    1.48 -				if (found==1){
    1.49 -					winboot=sprintf("hd%d,%d",disk,part)
    1.50 -				}
    1.51 -			}
    1.52 +	# Counting disk
    1.53 +	if ($1=="Disk"){disk++, part=-1}
    1.54 +	# Counting partition
    1.55 +	if (substr($1,1,4)=="/dev"){part++}
    1.56 +	# Read partition Id
    1.57 + 	if ($2=="*"){Id=$6}	else {Id=$5}
    1.58 +	# Detect Windows type
    1.59 +	if (Id=="7" || Id=="b"){
    1.60 +		if (found){
    1.61 +			# record 1st Windows partition found
    1.62 +			winboot=sprintf("hd%d,%d",disk,part),found++}
    1.63  		}
    1.64 -	}
    1.65  }
    1.66  END{printf "%s", winboot}')
    1.67  		if [ -z "$WINBOOT" ]; then