tazinst rev 24

Fix: errors displayed if a cd is loaded in the cdrom drive - Thank you Mojo.
author Dominique Corbex <domcox@slitaz.org>
date Tue Jan 07 22:00:46 2014 +0100 (2014-01-07)
parents 110f55033cf0
children df9c8e8bab7f
files tazinst
line diff
     1.1 --- a/tazinst	Mon Jan 06 00:25:40 2014 +0100
     1.2 +++ b/tazinst	Tue Jan 07 22:00:46 2014 +0100
     1.3 @@ -909,7 +909,7 @@
     1.4  
     1.5  list_partition_table()
     1.6  {
     1.7 -	/usr/sbin/parted -lm | \
     1.8 +	/usr/sbin/parted -lm 2>&1 | \
     1.9  		/bin/busybox awk -F: '/^\/dev\//{printf "%s: %s\n", $1,$6}'
    1.10  }
    1.11  
    1.12 @@ -938,7 +938,7 @@
    1.13  # list Windows partitions
    1.14  list_winboot()
    1.15  {
    1.16 -	/usr/sbin/parted -lm | /bin/busybox awk '
    1.17 +	/usr/sbin/parted -lm 2>&1 | /bin/busybox awk '
    1.18  	BEGIN{
    1.19  		FS=":"
    1.20  		disknum=-1
    1.21 @@ -1087,7 +1087,7 @@
    1.22  {
    1.23  	local uuid="$1" device
    1.24  	device="$(uuid2disk $uuid)"
    1.25 -	printf "%s" "$(/usr/sbin/parted -lm | grep "$device" | \
    1.26 +	printf "%s" "$(/usr/sbin/parted -lm 2>&1 | grep "$device" | \
    1.27  		cut -d':' -f6)"
    1.28  }
    1.29  
    1.30 @@ -1373,6 +1373,10 @@
    1.31  	log "$(gettext "Preparing target partition...")"
    1.32  	local uuid
    1.33  	# target may be in use
    1.34 +	if mount | grep -q "$ROOT_UUID" ;then
    1.35 +		log "$(gettext "Partition is already mounted, unmounting.")"
    1.36 +		umount "$ROOT_UUID"
    1.37 +	fi
    1.38  	mount | grep -q "$ROOT_UUID" && \
    1.39  		error 4 "$ROOT_UUID: $(gettext "Partition is already in use.")"
    1.40  	# Mount point can be already used.
    1.41 @@ -1445,7 +1449,7 @@
    1.42  
    1.43  end_of_install()
    1.44  {
    1.45 -	log "\n$(gettext "Process completed. You can now restart (reboot)")"
    1.46 +	log "$(gettext "Process completed. You can now restart (reboot)")"
    1.47  	log "$(gettext "from your SliTaz GNU/Linux system.")"
    1.48  	printf "%s\n" "=== Tazinst ended on $(date "+%x %X") ===" >> "$LOG"
    1.49  	unset LOGGING
    1.50 @@ -1495,7 +1499,7 @@
    1.51  {
    1.52  	local partition="$(uuid2dev $1)"
    1.53  	partition="${partition%[0-9]}"
    1.54 -	/usr/sbin/parted -lm | grep "^/dev" | \
    1.55 +	/usr/sbin/parted -lm 2>&1 | grep "^/dev" | \
    1.56  		/bin/busybox awk -v PART="$partition" '{if (match($0,PART)) print NR-1}'
    1.57  }
    1.58