tazpanel rev 294

installer.cgi: fix: Partition for home is formatted even if unchecked
author Dominique Corbex <domcox@slitaz.org>
date Wed Apr 25 21:45:40 2012 +0200 (2012-04-25)
parents bc85a363a4ba
children aa68e0881e3f
files installer.cgi
line diff
     1.1 --- a/installer.cgi	Thu Apr 12 01:42:49 2012 +0300
     1.2 +++ b/installer.cgi	Wed Apr 25 21:45:40 2012 +0200
     1.3 @@ -7,7 +7,7 @@
     1.4  # Authors : Dominique Corbex <domcox@slitaz.org>
     1.5  #
     1.6  
     1.7 -VERSION=0.29
     1.8 +VERSION=0.30
     1.9  
    1.10  # Common functions from libtazpanel
    1.11  . lib/libtazpanel
    1.12 @@ -21,7 +21,7 @@
    1.13  TEXTDOMAIN='installer'
    1.14  export TEXTDOMAIN
    1.15  
    1.16 -TITLE=$(gettext 'TazPanel - Installer')
    1.17 +TITLE="- Installer"
    1.18  
    1.19  # Tazinst required version
    1.20  TAZINST_REQUIRED_VERSION="3.3"
    1.21 @@ -52,7 +52,7 @@
    1.22  		# Home Partition
    1.23  		if [ -n "$(GET HOME_SELECT)" ] ; then
    1.24  			TGT_HOME=$(echo "$(GET TGT_HOME)" | sed 's/\//\\\//'g)
    1.25 -			[ -n "$(GET HOME_FS)" ] && TGT_HOME_FS=$(GET HOME_FS)
    1.26 +			[ -n "$(GET HOME_FMT)" ] && TGT_HOME_FS=$(GET HOME_FS) || TGT_HOME_FS=""
    1.27  		else
    1.28  			TGT_HOME=""
    1.29  			TGT_HOME_FS=""
    1.30 @@ -124,10 +124,10 @@
    1.31  			if [ ! -r $INSTFILE ]; then
    1.32  				cat <<EOT
    1.33  <span class="msg-nok">$(gettext "Setup File Error")<br />
    1.34 -$(gettext "The setup file <strong>$INSTFILE</strong> is not readable.
    1.35 +$(gettext "The setup file <strong>$INSTFILE</strong> is not readable. 
    1.36  Check permissions and ownership.")</span><br />
    1.37  EOT
    1.38 -			fi
    1.39 +			fi	
    1.40  		fi
    1.41  	fi
    1.42  	# read setup file
    1.43 @@ -156,7 +156,7 @@
    1.44  <p>
    1.45  	$(gettext "Install SliTaz on a partition of your hard disk drive. If
    1.46  	you decide to format your partition, all data will be lost. If you do not
    1.47 -	format, all data except for any existing /home directory will be removed,
    1.48 +	format, all data except for any existing /home directory will be removed, 
    1.49  	the home directory will be kept as is.")
    1.50  </p>
    1.51  <p>
    1.52 @@ -194,19 +194,19 @@
    1.53  <h4>$(gettext "Partitioning")</h4>
    1.54  <div class="box">
    1.55  <p>
    1.56 -	$(gettext "On most used systems, the hard drive is already dedicated to
    1.57 -	partitions for Windows<sup>&copy;</sup>, or Linux, or another operating
    1.58 +	$(gettext "On most used systems, the hard drive is already dedicated to 
    1.59 +	partitions for Windows<sup>&copy;</sup>, or Linux, or another operating 
    1.60  	system. You'll need to resize these partitions in order to make space for
    1.61  	SliTaz GNU/Linux. SliTaz will co-exist with other operating systems already
    1.62 -	installed on your hard drive.")
    1.63 +	installed on your hard drive.") 
    1.64  </p>
    1.65  <p>
    1.66 -	$(gettext "The amount of space needed depends on how much software you
    1.67 +	$(gettext "The amount of space needed depends on how much software you 
    1.68  	plan to install	and how much space you require for users. It's conceivable
    1.69  	that you could run a minimal SliTaz system in 300 megs or less, but 2 gigs
    1.70  	is indeed more comfy.")
    1.71  <p>
    1.72 -	$(gettext "A separate home partition, and a partition that will be used
    1.73 +	$(gettext "A separate home partition, and a partition that will be used 
    1.74  	as Linux swap space may be created if needed. Slitaz detects and uses swap
    1.75  	partitions automatically.")
    1.76  </p>
    1.77 @@ -222,7 +222,7 @@
    1.78  <p>
    1.79  	$(gettext "Gparted supports ext2, ext3, ext4, linux swap, ntfs and fat32
    1.80  	filesystems right out of the box. Support for xjs, jfs, hfs and other
    1.81 -	filesystems is available as well but you first need to add drivers for
    1.82 +	filesystems is available as well but you first need to add drivers for 
    1.83  	these filesystems by installing the related packages xfsprogs, jfsutils,
    1.84  	linux-hfs and so on.")
    1.85  </p>
    1.86 @@ -248,8 +248,8 @@
    1.87  <div id="wrapper">
    1.88  <h3>$(gettext "Install SliTaz")</h3>
    1.89  <p>$(gettext "You're going to install SliTaz on a partition of your hard disk drive. If
    1.90 -	you decide to format your HDD, all data will be lost. If you do not
    1.91 -	format, all data except for any existing /home directory will be removed,
    1.92 +	you decide to format your HDD, all data will be lost. If you do not 
    1.93 +	format, all data except for any existing /home directory will be removed, 
    1.94  	the home directory will be kept as is.")<p>
    1.95  </div>
    1.96  <input type="hidden" name="INST_ACTION" value="$1">
    1.97 @@ -314,7 +314,7 @@
    1.98  <a class="button" onclick="document.forms['ConfigForm'].url.value = '$(tazinst showurl stable)'; return true;">$(gettext "Stable")</a>
    1.99  <a class="button" onclick="document.forms['ConfigForm'].url.value = '$(tazinst showurl cooking)'; return true;">$(gettext "Cooking")</a>
   1.100  $(gettext "URL:")
   1.101 -<input id="url" type="url" size="55" name="SRC_WEB" value="$get_SRC_WEB" placeholder="$(gettext "Full url to an ISO image file")" />
   1.102 +<input id="url" type="url" size="55" name="SRC_WEB" $([ "$INST_TYPE" == "web" ] && echo -e "value=\"$SRC_FILE\"") placeholder="$(gettext "Full url to an ISO image file")" />
   1.103  </label>
   1.104  </div>
   1.105  EOT
   1.106 @@ -415,7 +415,7 @@
   1.107  	fi
   1.108  cat <<EOT
   1.109  </select>
   1.110 -
   1.111 +	
   1.112  <input type="checkbox" name="HOME_FMT" value="yes" $([ -n "$TGT_HOME_FS" ] && echo "checked") id="homefs" />
   1.113  <label for="homefs">$(gettext "Format partition as:")</label>
   1.114  <select name="HOME_FS">"
   1.115 @@ -529,9 +529,9 @@
   1.116  <meta name="keywords" content="automatic redirection">
   1.117  </head>
   1.118  <body>
   1.119 -$(gettext "If your browser doesn't automatically redirect within a few seconds,
   1.120 +$(gettext "If your browser doesn't automatically redirect within a few seconds, 
   1.121  you may want to go there manually")
   1.122 -<a href="$SCRIPT_NAME?page=$1">$1</a>
   1.123 +<a href="$SCRIPT_NAME?page=$1">$1</a> 
   1.124  </body>
   1.125  </html>
   1.126  EOT
   1.127 @@ -539,7 +539,7 @@
   1.128  
   1.129  check_ressources()
   1.130  {
   1.131 -	local code
   1.132 +	local code 
   1.133  	code=0
   1.134  	# Check tazinst
   1.135  	if ! tazinst usage | grep -q Usage: ; then