slitaz-tools rev 423

slitaz-installer: use file from USB device if no cdrom
author Christophe Lincoln <pankso@slitaz.org>
date Fri Jan 22 09:14:16 2010 +0100 (2010-01-22)
parents a1963defa12f
children 646a42073584
files installer/slitaz-installer
line diff
     1.1 --- a/installer/slitaz-installer	Fri Jan 22 07:26:15 2010 +0100
     1.2 +++ b/installer/slitaz-installer	Fri Jan 22 09:14:16 2010 +0100
     1.3 @@ -113,10 +113,22 @@
     1.4  	echo "XXX"
     1.5  	mkdir -p /media/cdrom
     1.6  	sleep 1
     1.7 -	echo "XXX" && echo 60
     1.8 -	echo -e "\nMounting cdrom ($CDROM)..."
     1.9 -	echo "XXX"
    1.10 -	mount -t iso9660 $CDROM /media/cdrom 2>>$LOG
    1.11 +	if mount -t iso9660 $CDROM /media/cdrom 2>>$LOG; then
    1.12 +		echo "XXX" && echo 60
    1.13 +		echo -e "\nUsing file from cdrom ($CDROM)..."
    1.14 +		echo "XXX"
    1.15 +		sleep 2
    1.16 +	else
    1.17 +		# We may be in LiveUSB mode
    1.18 +		if [ -d /home/boot ]; then
    1.19 +			echo "XXX" && echo 60
    1.20 +			echo -e "\nUsing file from USB device..."
    1.21 +			echo "XXX"
    1.22 +			rm /media/cdrom/boot 2>/dev/null
    1.23 +			ln -s /home/boot /media/cdrom/boot
    1.24 +			sleep 2
    1.25 +		fi
    1.26 +	fi
    1.27  	echo "XXX" && echo 90
    1.28  	echo -e "\nChecking installation media..."
    1.29  	echo "XXX"
    1.30 @@ -204,14 +216,14 @@
    1.31  ask_for_home()
    1.32  {
    1.33  	exec 3>&1
    1.34 -	HOME_DEV=`$DIALOG --title " Home Partition " \
    1.35 +	HOME_DEV=`$DIALOG --title " Root Partition " \
    1.36  		--backtitle "$BACKLIST" --clear \
    1.37  		--extra-label "List" --extra-button \
    1.38  		--colors --inputbox "
    1.39 -On most GNU/Linux systems users personal files are stored in the directory \
    1.40 +On most GNU/Linux system users personnal files are stored in the directoty \
    1.41  /home. Home can be on a separate partition or another hard disk.
    1.42  
    1.43 -\Z2Home partition to use (Optional):\Zn" 18 70 2>&1 1>&3`
    1.44 +\Z2Home partition to use (Option):\Zn" 18 70 2>&1 1>&3`
    1.45  	retval=$?
    1.46  	exec 3>&-
    1.47  	check_retval
    1.48 @@ -244,8 +256,8 @@
    1.49  		--clear --colors --yesno "
    1.50  Here you can format the /home partition: $HOME_DEV
    1.51  
    1.52 -SliTaz uses ext3 by default but another filesystem can be used if wanted, \
    1.53 -for this please adjust /etc/fstab after installation.
    1.54 +SliTaz use ext3 by default but another filesystem can be used if wanted, \
    1.55 +for this please adjust /etc/fstab afer installation.
    1.56  
    1.57  \Z2Do you want to format (Option): $HOME_DEV\Zn" 18 70
    1.58  	retval=$?
    1.59 @@ -303,8 +315,8 @@
    1.60  	USER=`$DIALOG --title " User name " \
    1.61  		--backtitle "$BACKLIST" --clear \
    1.62  		--colors --nocancel --inputbox "
    1.63 -The default user for the system will have their personal files stored \
    1.64 -in /home/*user* (and will be automatically added to the audio group).
    1.65 +The default user for the system will have his personal files stored \
    1.66 +in /home/*user* (and will automatically be added to the audio group).
    1.67  
    1.68  \Z2Default user name login:\Zn" 18 70 "tux" 2>&1 1>&3`
    1.69  	retval=$?
    1.70 @@ -319,7 +331,7 @@
    1.71  	USER_PASSWD=`$DIALOG --title " User password " \
    1.72  		--backtitle "$BACKLIST" --clear \
    1.73  		--colors --nocancel --inputbox "
    1.74 -The password for default user $USER. It may be a security risk if too \
    1.75 +The password for default user $USER. It may also be a security risk if too \
    1.76  weak and should always be strong if you use a SSH connection through the web.
    1.77  
    1.78  \Z2Please specify $USER password:\Zn" 18 70 "tux" 2>&1 1>&3`
    1.79 @@ -339,7 +351,7 @@
    1.80  		--backtitle "$BACKLIST" \
    1.81  		--clear --colors --yesno "
    1.82  Installation settings summary and last chance to cancel or restart all \
    1.83 -installation steps.
    1.84 +installator steps.
    1.85  
    1.86  Root partition: $TARGET_DEV
    1.87  Home partition: $HOME_DEV
    1.88 @@ -383,7 +395,7 @@
    1.89  		mkfs.ext3 -L "Home" $HOME_DEV >>$LOG 2>>$LOG
    1.90  	else
    1.91  		echo "XXX" && echo 70
    1.92 -		echo -e "\nThe partition ($HOME_DEV) will be kept..."
    1.93 +		echo -e "\nThe partition ($HOME_DEV) will be keeped..."
    1.94  		echo "XXX"
    1.95  		sleep 2
    1.96  	fi
    1.97 @@ -407,7 +419,7 @@
    1.98  {
    1.99  	if [ "$CLEAN" == "clean" ]; then
   1.100  		echo "XXX" && echo 15
   1.101 -		echo -e "\nCleaning the root partition ($TARGET_DEV)"
   1.102 +		echo -e "\nCleaning the root partition ($TARGET_DEV)..."
   1.103  		echo "XXX"
   1.104  		# Keep /home in case of reinstall.
   1.105  		cd $TARGET_ROOT
   1.106 @@ -598,7 +610,7 @@
   1.107  	clean_target
   1.108  
   1.109  	echo "XXX" && echo 20
   1.110 -	echo -e "\nInstalling the kernel ($KERNEL)"
   1.111 +	echo -e "\nInstalling the kernel ($KERNEL)..."
   1.112  	echo "XXX"
   1.113  	install_kernel
   1.114  
   1.115 @@ -667,7 +679,7 @@
   1.116  		0)
   1.117  			(
   1.118  			echo "XXX" && echo 50
   1.119 -			echo -e "\nRunning grub-install on : $TARGET_DISK"
   1.120 +			echo -e "\nRunning grub-install on : $TARGET_DISK..."
   1.121  			echo "XXX"
   1.122  			grub-install --no-floppy \
   1.123  				--root-directory=$TARGET_ROOT $TARGET_DISK 2>>$LOG
   1.124 @@ -678,7 +690,7 @@
   1.125  			) |
   1.126  			$DIALOG --title " GRUB install " \
   1.127  				--backtitle "$BACKLIST" \
   1.128 -				--gauge "Installing GRUB..." 18 70 0 ;;
   1.129 +				--gauge "Installating GRUB..." 18 70 0 ;;
   1.130  		1)
   1.131  			echo "grub_install: NO" >>$LOG ;;
   1.132  		255)
   1.133 @@ -691,12 +703,12 @@
   1.134  {
   1.135  	(
   1.136  	echo "XXX" && echo 25
   1.137 -	echo -e "\nCopying the log files ($LOG)"
   1.138 +	echo -e "\nCopying the log files ($LOG)..."
   1.139  	echo "XXX"
   1.140  	cp -a $LOG $TARGET_ROOT/var/log
   1.141  	sleep 2
   1.142  	echo "XXX" && echo 50
   1.143 -	echo -e "\nUnmounting the target ($TARGET_DEV)"
   1.144 +	echo -e "\nUnmounting the target ($TARGET_DEV)..."
   1.145  	echo "XXX"
   1.146  	if mount | grep -q $TARGET_ROOT; then
   1.147  		umount $TARGET_ROOT 2>/dev/null
   1.148 @@ -858,7 +870,7 @@
   1.149  	sleep 2
   1.150  
   1.151  	echo "XXX" && echo 25
   1.152 -	echo -e "\nInstalling the kernel ($KERNEL)"
   1.153 +	echo -e "\nInstalling the kernel ($KERNEL)..."
   1.154  	echo "XXX"
   1.155  	install_kernel
   1.156