tazinst annotate installer.cgi @ rev 49

Fix TazPanel Install menu; fix 'critical error' in po file; force to make link in makefile.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Mon Mar 30 23:32:45 2015 +0300 (2015-03-30)
parents 4854cb47d44a
children f0b248dc7e0c
rev   line source
domcox@0 1 #!/bin/sh
domcox@0 2 #
domcox@0 3 # Main CGI interface for Tazinst, the SliTaz installer.
domcox@0 4 #
al@46 5 # Copyright (C) 2012-2015 SliTaz GNU/Linux - BSD License
domcox@0 6 #
domcox@0 7 # Authors : Dominique Corbex <domcox@slitaz.org>
domcox@0 8 #
domcox@0 9
domcox@0 10
domcox@2 11 # restricted path
domcox@2 12 PATH="/usr/sbin:/usr/bin:/sbin:/bin"
domcox@0 13
al@46 14 VERSION=3.98
domcox@2 15
domcox@13 16 # Common functions from libtazpanel
domcox@13 17 . lib/libtazpanel
domcox@13 18 get_config
domcox@2 19
domcox@13 20 TITLE=$(gettext 'TazPanel - Installer')
domcox@0 21
domcox@2 22 # export package name for gettext.
domcox@2 23 TEXTDOMAIN='installer'
domcox@2 24 export TEXTDOMAIN
domcox@0 25
domcox@2 26 # tazinst required version
domcox@2 27 TAZINST_MINIMUM_VERSION="3.8"
domcox@2 28 TAZINST_MAXIMUM_VERSION="4.99"
domcox@0 29
domcox@2 30 # tazinst setup file
domcox@2 31 INSTFILE=/root/tazinst.conf
domcox@0 32
pascal@22 33 #------
pascal@22 34 # menu
pascal@22 35 #------
pascal@22 36 case "$1" in
al@46 37 menu)
al@46 38 [ "$REMOTE_USER" == "root" ] && cat << EOT
al@46 39 <li tabindex="0">
al@46 40 <span>$(gettext 'Install')</span>
al@46 41 <menu>
al@46 42 <li><a data-icon="install"
al@46 43 href="/installer.cgi">$(gettext 'Install')</a></li>
al@46 44 <li><a data-icon="slitaz"
al@49 45 href="/installer.cgi?page=install">$(gettext 'Install SliTaz')</a></li>
al@46 46 <li><a data-icon="upgrade"
al@49 47 href="/installer.cgi?page=upgrade">$(gettext 'Upgrade system')</a></li>
al@46 48 </menu>
pascal@22 49 </li>
pascal@22 50 EOT
pascal@22 51 exit
pascal@22 52 esac
domcox@0 53
domcox@2 54 #-----------
domcox@2 55 # home page
domcox@2 56 #-----------
domcox@0 57
domcox@0 58 select_action()
domcox@0 59 {
domcox@13 60 comment "Welcome message"
domcox@13 61 open_div 'id="wrapper"'
domcox@13 62 h4 "$(gettext "Welcome to the Slitaz Installer!")"
domcox@13 63 p "$(gettext "The SliTaz Installer installs or upgrades SliTaz to a \
al@6 64 hard disk drive from a device like a Live-CD or LiveUSB key, from a SliTaz \
domcox@13 65 ISO file, or from the web by downloading an ISO file.")"
domcox@13 66 h5 "$(gettext "Which type of installation do you want to start?")"
domcox@2 67 close_div
domcox@0 68 }
domcox@0 69
domcox@0 70 select_install()
domcox@0 71 {
domcox@13 72 comment "Install message"
domcox@13 73 open_div 'class="box"'
domcox@13 74 h4 "$(gettext 'Install')"
domcox@13 75 p "$(gettext "Install SliTaz on a partition of your hard disk drive. If \
domcox@13 76 you decide to format your partition, all data will be lost. If you do not \
paul@16 77 format, all data except for any existing /home directory will be removed \
paul@16 78 (the home directory will be kept as is).")"
domcox@13 79 p "$(gettext "Before installation, you may need to create or resize \
al@6 80 partitions on your hard disk drive in order to make space for SliTaz \
domcox@13 81 GNU/Linux. You can graphically manage your partitions with Gparted")"
domcox@2 82 close_div
al@6 83 button "install" \
al@6 84 "$(gettext 'Install SliTaz')" \
al@6 85 "$(gettext 'Proceed to a new SliTaz installation')"
domcox@0 86 }
domcox@0 87
domcox@0 88 select_upgrade()
domcox@0 89 {
domcox@13 90 comment "Upgrade message"
domcox@13 91 open_div 'class="box"'
domcox@13 92 h4 "$(gettext 'Upgrade')"
domcox@13 93 p "$(gettext "Upgrade an already installed SliTaz system on your hard disk \
al@6 94 drive. Your /home /etc /var/www directories will be kept, all other \
al@6 95 directories will be removed. Any additional packages added to your old \
domcox@13 96 Slitaz system will be updated as long you have an active internet connection.")"
domcox@2 97 close_div
al@6 98 button "upgrade" \
al@6 99 "$(gettext 'Upgrade SliTaz')" \
al@6 100 "$(gettext 'Upgrade an existing SliTaz system')"
domcox@2 101 }
domcox@0 102
domcox@2 103 #--------------------
paul@31 104 # partitioning page
domcox@2 105 #--------------------
domcox@0 106
domcox@2 107 exec_gparted()
domcox@2 108 {
domcox@13 109 /bin/su - -c \
domcox@13 110 "exec env DISPLAY=':0.0' XAUTHORITY='/var/run/slim.auth' /usr/sbin/gparted"
domcox@0 111 }
domcox@0 112
domcox@0 113 select_gparted()
domcox@0 114 {
domcox@13 115 comment "GParted message"
domcox@13 116 h5 "$(gettext "Partitioning")"
domcox@13 117 open_div 'class="box"'
domcox@13 118 p "$(gettext "On most used systems, the hard drive is already dedicated to \
al@6 119 partitions for Windows<sup>&trade;</sup>, or Linux, or another operating \
al@6 120 system. You'll need to resize these partitions in order to make space for \
al@6 121 SliTaz GNU/Linux. SliTaz will co-exist with other operating systems already \
domcox@13 122 installed on your hard drive.")"
domcox@13 123 p "$(gettext "The amount of space needed depends on how much software you \
al@6 124 plan to install and how much space you require for users. It's conceivable \
al@6 125 that you could run a minimal SliTaz system in 300 megs or less, but 2 gigs \
domcox@13 126 is indeed more comfy.")"
paul@31 127 p "$(gettext "A separate home partition and a partition that will be used \
al@6 128 as Linux swap space may be created if needed. Slitaz detects and uses swap \
domcox@13 129 partitions automatically.")"
domcox@2 130 close_div
domcox@13 131 open_div 'class="box"'
domcox@13 132 p "$(gettext "You can graphically manage your partitions with GParted. \
al@6 133 GParted is a partition editor for graphically managing your disk partitions. \
al@6 134 GParted allows you to create, destroy, resize and copy partitions without \
domcox@13 135 data loss.")"
domcox@13 136 p "$(gettext "GParted supports ext2, ext3, ext4, linux swap, ntfs and \
domcox@13 137 fat32 filesystems right out of the box. Support for xjs, jfs, hfs and other \
al@6 138 filesystems is available as well but you first need to add drivers for these \
al@6 139 filesystems by installing the related packages xfsprogs, jfsutils, linux-hfs \
domcox@13 140 and so on.")"
domcox@2 141 close_div
domcox@13 142 comment "Launch GParted"
al@6 143 button "gparted" \
al@6 144 "$(gettext 'Execute GParted')" \
al@6 145 "$(gettext 'Launch GParted, the partition editor tool')"
domcox@13 146 h5 "$(gettext "Continue installation")"
domcox@13 147 p "$(gettext "Once you've made room for SliTaz on your drive, you should \
domcox@13 148 be able to continue installation.")"
domcox@0 149 }
domcox@0 150
domcox@2 151 #------------
domcox@2 152 # input page
domcox@2 153 #------------
domcox@2 154
domcox@2 155
domcox@2 156 select_source()
domcox@0 157 {
domcox@2 158 local media="$(/usr/sbin/tazinst get media "$INSTFILE")"
domcox@2 159 local source="$(/usr/sbin/tazinst get source "$INSTFILE")"
domcox@2 160 local list_media="$(/usr/sbin/tazinst list media)"
domcox@13 161 local error
domcox@2 162
domcox@13 163 # set default media
domcox@2 164 [ "$media" ] || media="$(tazinst list media | cut -d ' ' -f1)"
domcox@13 165
domcox@13 166 comment "Source selection"
domcox@2 167 # cdrom
domcox@13 168 if printf '%s' "$list_media" | grep -q "cdrom"; then
al@6 169 input_media "cdrom" \
al@6 170 "$media"
al@6 171 label_media "cdrom" \
al@6 172 "$(gettext 'LiveCD')" \
al@6 173 "$media" \
al@6 174 "$(gettext 'Use the SliTaz LiveCD')"
domcox@2 175 br
domcox@2 176 fi
domcox@2 177 # usb
domcox@13 178 if printf '%s' "$list_media" | grep -q "usb"; then
al@6 179 input_media "usb" \
al@6 180 "$media"
al@6 181 label_media "usb" \
al@6 182 "$(gettext 'LiveUSB:')" \
al@6 183 "$media" \
domcox@13 184 "$(gettext 'Enter the partition where SliTaz Live is located on
domcox@13 185 your USB Key')"
domcox@2 186 error="$?"
domcox@19 187 select "$(/usr/sbin/tazinst list usb "$INSTFILE" | cut -d' ' -f2)" \
al@6 188 "$source" \
al@6 189 "SRC_USB"
al@6 190 error_msg "$error" \
al@6 191 "source" \
al@6 192 2
domcox@2 193 br
domcox@2 194 fi
domcox@2 195 # iso
al@6 196 input_media "iso" \
al@6 197 "$media"
al@6 198 label_media "iso" \
al@6 199 "$(gettext 'ISO file:')" \
al@6 200 "$media" \
al@6 201 "$(gettext 'Select a SliTaz ISO file located on a local disk')"
domcox@2 202 error="$?"
domcox@2 203 if [ "$media" == "iso" ]; then
al@6 204 input "text" \
al@6 205 "src_iso" \
al@6 206 "$source" "" \
domcox@13 207 "$(gettext 'Select an ISO or enter the full path to the ISO file')"\
domcox@2 208 "iso"
domcox@2 209 else
al@6 210 input "text" \
al@6 211 "src_iso" \
al@6 212 "" \
al@6 213 "none" \
domcox@13 214 "$(gettext 'Select an ISO or enter the full path to the ISO file')"\
domcox@2 215 "iso"
domcox@2 216 fi
al@6 217 datalist "$(/usr/sbin/tazinst list iso "$INSTFILE")" \
al@6 218 "src_iso"
al@6 219 error_msg "$error" \
al@6 220 "source"
domcox@2 221 br
domcox@2 222 # web
al@6 223 input_media "web" \
al@6 224 "$media"
al@6 225 label_media "web" \
al@6 226 "$(gettext 'Web:')" \
al@6 227 "$media" \
al@6 228 "$(gettext 'Select a SliTaz version on the Web')"
domcox@2 229 error="$?"
domcox@2 230
domcox@2 231 if [ "$media" == "web" ]; then
al@6 232 input "text" \
al@6 233 "src_web" \
al@6 234 "$source" "" \
domcox@13 235 "$(gettext 'Select a version or enter the full url to an ISO file')"\
domcox@2 236 "web"
domcox@2 237 else
al@6 238 input "text" \
al@6 239 "src_web" \
al@6 240 "" \
al@6 241 "none" \
domcox@13 242 "$(gettext 'Select a version or enter the full url to an ISO file')"\
domcox@2 243 "web"
domcox@2 244 fi
al@6 245 datalist "$(/usr/sbin/tazinst help web "$INSTFILE")" \
al@6 246 "src_web"
al@6 247 error_msg "$error" \
al@6 248 "source"
domcox@2 249 }
domcox@2 250
domcox@2 251 select_root_uuid()
domcox@2 252 {
domcox@2 253 local root_uuid="$(/usr/sbin/tazinst get root_uuid "$INSTFILE")"
domcox@2 254 local mode="$(/usr/sbin/tazinst get mode "$INSTFILE")"
domcox@2 255 comment "root_uuid selection"
domcox@2 256 if [ "$mode" == "upgrade" ]; then
al@6 257 label "root_uuid" \
al@6 258 "$(gettext 'Existing SliTaz partition to upgrade:')" \
al@6 259 "$(gettext 'Specify the partition containing the system to upgrade')"
domcox@2 260 error="$?"
domcox@2 261 else
al@6 262 label "root_uuid" \
al@6 263 "$(gettext 'Install Slitaz to partition:')" \
al@6 264 "$(gettext 'Specify the partition where to install SliTaz')"
domcox@2 265 error="$?"
domcox@2 266 fi
al@6 267 select "$(/usr/sbin/tazinst list uuid "$INSTFILE")" \
al@6 268 "$root_uuid" \
al@6 269 "ROOT_UUID" \
domcox@28 270 0
al@6 271 error_msg "$error" \
al@6 272 "root_uuid" \
domcox@28 273 0
domcox@2 274 br
domcox@2 275 }
domcox@2 276
domcox@2 277 select_root_format()
domcox@2 278 {
domcox@2 279 local root_format="$(/usr/sbin/tazinst get root_format "$INSTFILE")"
domcox@2 280 comment "root_format selection"
al@6 281 format "$(/usr/sbin/tazinst list format "$INSTFILE")" \
al@6 282 "$root_format" \
al@6 283 "ROOT_FORMAT"
domcox@2 284 }
domcox@2 285
domcox@2 286 select_options()
domcox@2 287 {
domcox@13 288 printf '<h4 id="options">%s</h4>' "$(gettext 'Options')"
domcox@2 289 }
domcox@2 290
domcox@2 291 select_home_uuid()
domcox@2 292 {
domcox@2 293 local home_uuid="$(/usr/sbin/tazinst get home_uuid "$INSTFILE")"
domcox@2 294 comment "home_uuid selection"
domcox@19 295 h5 "$(gettext "home partition")"
al@6 296 label "home_uuid" \
al@6 297 "$(gettext 'Separate partition for /home:')" \
al@6 298 "$(gettext 'Specify the partition containing /home')"
al@6 299 select "$(/usr/sbin/tazinst list uuid "$INSTFILE")" \
al@6 300 "$home_uuid" \
al@6 301 "HOME_UUID" \
domcox@28 302 0
domcox@2 303 br
domcox@2 304 }
domcox@2 305
domcox@2 306 select_home_format()
domcox@2 307 {
domcox@2 308 local home_format="$(/usr/sbin/tazinst get home_format "$INSTFILE")"
domcox@2 309 comment "home_format selection"
al@6 310 format "$(/usr/sbin/tazinst list format "$INSTFILE")" \
al@6 311 "$home_format" \
al@6 312 "HOME_FORMAT"
domcox@2 313 }
domcox@2 314
domcox@2 315 select_hostname()
domcox@2 316 {
domcox@2 317 local hostname="$(/usr/sbin/tazinst get hostname "$INSTFILE")" error
domcox@2 318 comment "hostname selection"
domcox@19 319 h5 "$(gettext "Hostname")"
al@6 320 label "hostname" \
al@6 321 "$(gettext 'Set Hostname to:')" \
al@6 322 "$(gettext 'Hostname configuration allows you to specify the machine name')"
domcox@2 323 error=$?
al@6 324 input "text" \
al@6 325 "HOSTNAME" \
al@6 326 "$hostname" \
al@6 327 "" \
al@6 328 "$(gettext 'Name of your system')"
al@6 329 error_msg "$error" \
al@6 330 "hostname" \
al@6 331 2
domcox@2 332 }
domcox@2 333
domcox@2 334 select_root_pwd()
domcox@2 335 {
domcox@2 336 local root_pwd="$(/usr/sbin/tazinst get root_pwd "$INSTFILE")" error
domcox@2 337 comment "root_pwd selection"
domcox@19 338 h5 "$(gettext "Root superuser")"
al@6 339 label "root_pwd" \
al@6 340 "$(gettext 'Root passwd:')" \
al@6 341 "$(gettext 'Enter the password for root')"
domcox@2 342 error="$?"
al@6 343 input "text" \
al@6 344 "ROOT_PWD" \
al@6 345 "$root_pwd" \
al@6 346 "" \
al@6 347 "$(gettext 'Password of root')"
al@6 348 error_msg "$error" \
al@6 349 "root_pwd"
domcox@2 350 }
domcox@2 351
domcox@2 352 select_user_login()
domcox@2 353 {
domcox@2 354 local user_login="$(/usr/sbin/tazinst get user_login "$INSTFILE")" error
domcox@2 355 comment "user_login selection"
domcox@19 356 h5 "$(gettext "User")"
al@6 357 label "user_login" \
al@6 358 "$(gettext 'User login:')" \
al@6 359 "$(gettext 'Enter the name of the first user')"
domcox@2 360 error="$?"
al@6 361 input "text" \
al@6 362 "USER_LOGIN" \
al@6 363 "$user_login" \
al@6 364 "" \
domcox@2 365 "$(gettext 'Name of the first user')"
al@6 366 error_msg "$error" \
al@6 367 "user_login" \
al@6 368 2
domcox@2 369 br
domcox@2 370 }
domcox@2 371
domcox@2 372 select_user_pwd()
domcox@2 373 {
domcox@2 374 local user_pwd="$(/usr/sbin/tazinst get user_pwd "$INSTFILE")" error
al@6 375 label "user_pwd" \
al@6 376 "$(gettext 'User passwd:')" \
al@6 377 "$(gettext 'The password for default user')"
domcox@2 378 error="$?"
al@6 379 input "text" \
al@6 380 "USER_PWD" \
al@6 381 "$user_pwd" \
al@6 382 "" \
domcox@2 383 "$(gettext 'Password of the first user')"
al@6 384 error_msg "$error" \
al@6 385 "user_pwd"
domcox@2 386 }
domcox@2 387
domcox@2 388 select_bootloader()
domcox@2 389 {
domcox@2 390 local bootloader="$(/usr/sbin/tazinst get bootloader "$INSTFILE")" error
domcox@2 391 comment "bootloader selection"
domcox@19 392 h5 "$(gettext "Bootloader")"
al@6 393 input "checkbox" \
al@6 394 "bootloader" \
al@6 395 "auto" \
al@6 396 "$bootloader"
al@6 397 label "bootloader" \
al@6 398 "$(gettext 'Install a bootloader.')" \
domcox@13 399 "$(gettext "Usually you should answer yes, unless you want to install \
domcox@13 400 a bootloader by hand yourself.")"
domcox@2 401 error="$?"
al@6 402 error_msg "$error" \
al@6 403 "bootloader"
domcox@2 404 br
domcox@2 405 }
domcox@2 406
domcox@2 407 select_winboot()
domcox@2 408 {
domcox@2 409 local winboot="$(/usr/sbin/tazinst get winboot "$INSTFILE")" error
domcox@2 410 comment "winboot selection"
al@6 411 input "checkbox" \
al@6 412 "winboot" \
al@6 413 "auto" \
al@6 414 "$winboot"
al@6 415 label "winboot" \
al@6 416 "$(gettext 'Enable Windows Dual-Boot.')" \
domcox@13 417 "$(gettext "At start-up, you will be asked whether you want to boot \
domcox@13 418 into Windows&trade; or SliTaz GNU/Linux.")"
domcox@2 419 error="$?"
al@6 420 error_msg "$error" \
al@6 421 "winboot"
domcox@2 422 }
domcox@2 423
domcox@2 424 errors_msg()
domcox@2 425 {
domcox@2 426 if [ "$CHECK" ]; then
domcox@13 427 echo '<span class="alert">'
domcox@28 428 p "$(gettext "Errors found. Please check your settings.")"
domcox@13 429 echo '</span>'
domcox@2 430 fi
domcox@2 431 }
domcox@2 432
domcox@2 433 select_settings()
domcox@2 434 {
domcox@2 435 local settings="$(/usr/sbin/tazinst get settings "$INSTFILE")"
domcox@2 436 CHECK=$(GET CHECK)
domcox@2 437 errors_msg
domcox@13 438 h4 "$(gettext "Select source media:")"
domcox@13 439 open_div 'class="box"'
domcox@13 440 open_div 'class="media"'
domcox@2 441 select_source
domcox@2 442 close_div
domcox@2 443 close_div
domcox@13 444 h4 "$(gettext "Select destination")"
domcox@13 445 open_div 'class="box"'
domcox@2 446 select_root_uuid
domcox@13 447 printf '%s' "$settings" | grep -q "root_format" \
domcox@2 448 && select_root_format
domcox@2 449 close_div
domcox@2 450 select_options
domcox@13 451 open_div 'class="options"'
domcox@13 452 printf '%s' "$settings" | grep -q "home_uuid" && select_home_uuid
domcox@13 453 printf '%s' "$settings" | grep -q "home_format" \
domcox@2 454 && select_home_format
domcox@13 455 printf '%s' "$settings" | grep -q "hostname" && select_hostname
domcox@13 456 printf '%s' "$settings" | grep -q "root_pwd" && select_root_pwd
domcox@13 457 printf '%s' "$settings" | grep -q "user_login" && select_user_login
domcox@13 458 printf '%s' "$settings" | grep -q "user_pwd" && select_user_pwd
domcox@2 459 close_div
domcox@13 460 open_div 'class="bootloader"'
domcox@13 461 printf '%s' "$settings" | grep -q "bootloader" && select_bootloader
domcox@13 462 printf '%s' "$settings" | grep -q "winboot" && select_winboot
domcox@2 463 close_div
domcox@2 464 br
domcox@2 465 }
domcox@2 466
domcox@2 467 #--------------
domcox@2 468 # execute page
domcox@2 469 #--------------
domcox@2 470
domcox@2 471 save_settings()
domcox@2 472 {
domcox@19 473 h5 "$(gettext "Checking settings...")"
domcox@2 474 # install type
domcox@2 475 /usr/sbin/tazinst set media "$(GET MEDIA)" "$INSTFILE"
domcox@2 476 # source File
domcox@2 477 case "$(/usr/sbin/tazinst get media "$INSTFILE")" in
domcox@2 478 usb)
domcox@2 479 /usr/sbin/tazinst set source "$(GET SRC_USB)" "$INSTFILE" ;;
domcox@2 480 iso)
domcox@2 481 /usr/sbin/tazinst set source "$(GET SRC_ISO)" "$INSTFILE" ;;
domcox@2 482 web)
domcox@2 483 /usr/sbin/tazinst set source "$(GET SRC_WEB)" "$INSTFILE" ;;
domcox@2 484 esac
domcox@2 485 # set defined url
domcox@2 486 [ $(GET URL) ] && SRC_WEB=$(GET URL)
domcox@2 487 # root Partition
domcox@2 488 /usr/sbin/tazinst set root_uuid "$(GET ROOT_UUID)" "$INSTFILE"
domcox@2 489 # format root partition
domcox@2 490 [ "$(GET ROOT_FORMAT)" ] \
domcox@2 491 && /usr/sbin/tazinst set root_format "$(GET ROOT_FORMAT)" "$INSTFILE" \
domcox@2 492 || /usr/sbin/tazinst unset root_format "$INSTFILE"
domcox@2 493 # home Partition
domcox@2 494 if [ "$(GET HOME_UUID)" ] ; then
domcox@2 495 /usr/sbin/tazinst set home_uuid "$(GET HOME_UUID)" "$INSTFILE"
domcox@2 496 [ "$(GET HOME_FORMAT)" ] \
domcox@2 497 && /usr/sbin/tazinst set home_format "$(GET HOME_FORMAT)" \
domcox@2 498 "$INSTFILE" \
domcox@2 499 || /usr/sbin/tazinst unset home_format "$INSTFILE"
domcox@2 500 else
domcox@2 501 /usr/sbin/tazinst unset home_uuid "$INSTFILE"
domcox@2 502 /usr/sbin/tazinst unset home_format "$INSTFILE"
domcox@2 503 fi
domcox@2 504 # hostname
domcox@2 505 /usr/sbin/tazinst set hostname "$(GET HOSTNAME)" "$INSTFILE"
domcox@2 506 # root pwd
domcox@2 507 /usr/sbin/tazinst set root_pwd "$(GET ROOT_PWD)" "$INSTFILE"
domcox@2 508 # user Login
domcox@2 509 /usr/sbin/tazinst set user_login "$(GET USER_LOGIN)" "$INSTFILE"
domcox@2 510 # user Pwd
domcox@2 511 /usr/sbin/tazinst set user_pwd "$(GET USER_PWD)" "$INSTFILE"
domcox@2 512 # win Dual-Boot
domcox@2 513 /usr/sbin/tazinst set winboot "$(GET WINBOOT)" "$INSTFILE"
domcox@2 514 # bootloader
domcox@2 515 if [ "$(GET BOOTLOADER)" == "auto" ]; then
domcox@2 516 /usr/sbin/tazinst set bootloader "auto" "$INSTFILE"
domcox@2 517 else
domcox@2 518 /usr/sbin/tazinst unset bootloader "$INSTFILE"
domcox@2 519 /usr/sbin/tazinst unset winboot "$INSTFILE"
domcox@2 520 fi
domcox@2 521 input_hidden "CHECK" "yes"
domcox@2 522 }
domcox@2 523
domcox@2 524 tazinst_run()
domcox@2 525 {
domcox@2 526 local mode="$(/usr/sbin/tazinst get mode "$INSTFILE")" error
domcox@2 527 h4 "Proceeding to: $mode"
domcox@2 528 /usr/sbin/tazinst execute "$INSTFILE" | /bin/busybox awk '{
domcox@2 529 num=$1+0
domcox@2 530 if (num>0 && num<=100){
domcox@2 531 print "<script type=\"text/javascript\">"
domcox@2 532 printf "document.write(\047<div id=\"progress\">"
domcox@2 533 printf "<img src=\"/styles/default/images/loader.gif\" />"
domcox@2 534 printf $1 "&#37; " substr($0, length($1)+2, 40)
domcox@2 535 print "</div>\047)"
domcox@2 536 print "</script>"
domcox@2 537 }
domcox@2 538 }'
domcox@2 539 # end_of_install
domcox@2 540 if /usr/sbin/tazinst log | grep -q "x-x-" ; then
domcox@2 541 error=1
domcox@2 542 echo "<script type=\"text/javascript\">"
domcox@2 543 printf "document.write(\047<div id=\"progress\">"
domcox@2 544 printf "<img src=\"/styles/default/images/stop.png\" />"
al@6 545 printf "$(gettext 'Errors encountered.')"
domcox@2 546 printf "</div>\047)\n"
domcox@2 547 echo "</script>"
domcox@2 548 br
domcox@2 549 br
domcox@2 550 /usr/sbin/tazinst log | \
domcox@2 551 /bin/busybox awk '$1 == "-x-x-",$1 == "x-x-x"' | sed 's/-x-x-/ /' \
domcox@2 552 | grep -v "x-x-x"
domcox@2 553 else
domcox@2 554 error=0
domcox@2 555 echo "<script type=\"text/javascript\">"
domcox@2 556 printf "document.write(\047<div id=\"progress\">"
domcox@2 557 printf "<img src=\"/styles/default/images/tux.png\" />"
al@6 558 printf "$(gettext 'Process completed!')"
domcox@2 559 printf "</div>\047)\n"
domcox@2 560 echo "</script>"
domcox@2 561 br
domcox@2 562 br
domcox@2 563 br
al@6 564 p $(gettext "Installation is now finished, you can exit the installer \
al@6 565 or reboot on your new SliTaz GNU/Linux operating system.")
domcox@2 566 fi
domcox@2 567 return "$error"
domcox@2 568
domcox@2 569 }
domcox@2 570
domcox@2 571 tazinst_log()
domcox@2 572 {
domcox@13 573 h4 "$(gettext "Tazinst log")"
domcox@13 574 printf '<pre>%s</pre>' "$(/usr/sbin/tazinst log | sed 's/\%/ percent/g')"
domcox@2 575 }
domcox@2 576
domcox@2 577
domcox@2 578 #-----------------
domcox@2 579 # page navigation
domcox@2 580 #-----------------
domcox@2 581
domcox@2 582 display_mode()
domcox@2 583 {
domcox@2 584 local mode="$(/usr/sbin/tazinst get mode "$INSTFILE")"
domcox@2 585 case $mode in
domcox@0 586 install)
domcox@13 587 open_div 'id="wrapper"'
domcox@13 588 h4 "$(gettext "Install SliTaz")"
domcox@13 589 p "$(gettext "You're going to install SliTaz on a partition of \
domcox@13 590 your hard disk drive. If you decide to format your HDD, all data will be \
al@6 591 lost. If you do not format, all data except for any existing /home \
paul@16 592 directory will be removed (the home directory will be kept as is).")"
domcox@2 593 close_div
domcox@0 594 ;;
domcox@0 595 upgrade)
domcox@13 596 open_div 'id="wrapper"'
domcox@13 597 h4 "$(gettext "Upgrade SliTaz")"
domcox@13 598 p "$(gettext "You're going to upgrade an already installed SliTaz \
al@6 599 system on your hard disk drive. Your /home /etc /var/www directories \
al@6 600 will be kept, all other directories will be removed. Any additional \
al@6 601 packages added to your old Slitaz system will be updated as long you \
domcox@13 602 have an active internet connection.")"
domcox@2 603 close_div
domcox@0 604 ;;
domcox@0 605 esac
domcox@0 606 }
domcox@0 607
domcox@2 608 moveto_page()
domcox@0 609 {
domcox@13 610 local back_page="$1" next_page="$2" back_msg next_msg
domcox@13 611 case "$back_page" in
domcox@2 612 partitioning)
domcox@2 613 back_msg=$(gettext 'Back to partitioning') ;;
domcox@2 614 input)
domcox@2 615 back_msg=$(gettext 'Back to entering settings') ;;
domcox@2 616 *)
domcox@2 617 back_msg=$(gettext 'Back to Installer Start Page') ;;
domcox@2 618 esac
domcox@13 619 case "$next_page" in
domcox@2 620 execute|run)
domcox@2 621 next_msg=$(gettext 'Proceed to SliTaz installation') ;;
domcox@2 622 reboot)
domcox@2 623 next_msg=$(gettext 'Installation complete. You can now restart') ;;
domcox@2 624 failed)
domcox@2 625 next_msg=$(gettext 'Installation failed. See log') ;;
domcox@2 626 input)
domcox@2 627 next_msg=$(gettext 'Continue installation.') ;;
domcox@2 628 *)
domcox@2 629 next_msg=$(gettext 'Back to Installer Start Page') ;;
domcox@2 630 esac
domcox@2 631 hr
domcox@13 632 input_hidden "page" "$next_page"
domcox@13 633 a "$back_page" "$back_msg"
al@6 634 input "submit" \
al@6 635 "" \
al@6 636 "$next_msg"
domcox@0 637 }
domcox@0 638
domcox@2 639 moveto_home()
domcox@0 640 {
domcox@13 641 a "home" "$(gettext 'Back to Installer Start Page')"
domcox@0 642 }
domcox@0 643
domcox@0 644 page_redirection()
domcox@0 645 {
domcox@2 646 local page="$1"
domcox@2 647 cat <<EOT
domcox@0 648 <!DOCTYPE html>
domcox@0 649 <html>
domcox@0 650 <head>
domcox@0 651 <meta charset="utf-8">
domcox@0 652 <title>$(gettext "A web page that points a browser to a different page after \
domcox@0 653 2 seconds")</title>
domcox@0 654 <meta http-equiv="refresh" content="0; URL=$SCRIPT_NAME?page=$1">
domcox@0 655 <meta name="keywords" content="automatic redirection">
domcox@0 656 </head>
domcox@0 657 <body>
domcox@0 658 <p>$(gettext "If your browser doesn't automatically redirect within a few \
domcox@2 659 seconds, you may want to go there manually")
domcox@2 660 <a href="$SCRIPT_NAME?page=$page">$(gettext "here")</a></p>
domcox@0 661 </body>
domcox@0 662 </html>
domcox@0 663 EOT
domcox@0 664 }
domcox@0 665
domcox@2 666 #----------
domcox@2 667 # checking
domcox@2 668 #----------
domcox@2 669
domcox@0 670 check_ressources()
domcox@0 671 {
domcox@2 672 local errorcode=0
domcox@2 673 comment "check_ressources"
domcox@0 674 if ! [ -x /usr/sbin/tazinst ] ; then
al@6 675 h4 $(gettext "Tazinst Error")
al@6 676 p $(gettext "<strong>tazinst</strong>, the backend to slitaz-installer \
al@6 677 is missing. Any installation can not be done without tazinst.")
al@6 678 p $(gettext "Check tazinst permissions, or reinstall the \
al@6 679 slitaz-installer package.")
domcox@2 680 errorcode=1
domcox@0 681 else
domcox@2 682 # check tazinst minimum version
domcox@2 683 v=$(/usr/sbin/tazinst version | tr -d '[:alpha:]')
domcox@2 684 r=$TAZINST_MINIMUM_VERSION
domcox@13 685 if ! (printf '%s' "$v" | /bin/busybox awk -v r=$r \
domcox@2 686 '{v=$v+0}{ if (v < r) exit 1}') ; then
al@6 687 h4 $(gettext "Tazinst Error")
al@6 688 p $(gettext "<strong>tazinst</strong>, the slitaz-installer \
al@6 689 backend, is not at the minimum required version. Any installation \
al@6 690 cannot be done without tazinst.")
al@6 691 p $(gettext "Reinstall the slitaz-installer package, or use \
al@6 692 tazinst in CLI mode.")
domcox@2 693 errorcode=1
domcox@2 694 fi
domcox@2 695 # check tazinst maximum version
domcox@2 696 v=$(/usr/sbin/tazinst version | tr -d '[:alpha:]')
domcox@2 697 r=$TAZINST_MAXIMUM_VERSION
domcox@13 698 if ! (printf '%s' "$v" | /bin/busybox awk -v r=$r \
domcox@2 699 '{v=$v+0}{ if (v > r) exit 1}') ; then
al@6 700 h4 $(gettext "Tazinst Error")
al@6 701 p $(gettext "<strong>tazinst</strong>, the slitaz-installer \
al@6 702 backend, is at a higher version than the maximum authorized \
al@6 703 by the slitaz-installer. Any installation cannot be done.")
al@6 704 p $(gettext "Reinstall the slitaz-installer package, or use \
al@6 705 tazinst in CLI mode.")
domcox@2 706 errorcode=1
domcox@0 707 fi
domcox@0 708 fi
domcox@2 709 return $errorcode
domcox@0 710 }
domcox@0 711
domcox@2 712
domcox@2 713 #---------------
domcox@2 714 # html snippets
domcox@2 715 #---------------
domcox@2 716
domcox@2 717 br()
domcox@0 718 {
domcox@13 719 echo '<br />'
domcox@0 720 }
domcox@0 721
domcox@2 722 hr()
domcox@0 723 {
domcox@13 724 echo '<hr />'
domcox@0 725 }
domcox@0 726
domcox@2 727 comment()
domcox@0 728 {
domcox@13 729 printf '<!-- %s -->\n' "$@"
domcox@2 730 }
domcox@2 731
domcox@2 732 a()
domcox@2 733 {
domcox@13 734 local page="$1" text="$2"
domcox@13 735 printf '<a class="button" value="%s" href="%s?page=%s">%s</a>\n' \
domcox@13 736 "$page" "$SCRIPT_NAME" "$page" "$text"
domcox@13 737 }
domcox@13 738
domcox@13 739 button()
domcox@13 740 {
domcox@13 741 local action="$1" msg="$2" title="$3"
domcox@13 742 printf '<a class="button" href="%s?page=%s" title="%s">%s</a>\n' \
domcox@13 743 "$SCRIPT_NAME" "$action" "$title" "$msg"
domcox@2 744 }
domcox@2 745
domcox@2 746 open_div()
domcox@2 747 {
domcox@13 748 [ "$1" ] && printf '<div %s>\n' "$1" || echo '<div>'
domcox@2 749 }
domcox@2 750
domcox@2 751 close_div()
domcox@2 752 {
domcox@13 753 echo '</div>'
domcox@2 754 }
domcox@2 755
domcox@2 756 p()
domcox@2 757 {
domcox@13 758 printf '<p>%s</p>\n' "$@"
domcox@2 759 }
domcox@2 760
domcox@2 761 h4()
domcox@2 762 {
domcox@13 763 printf '<h4>%s</h4>\n' "$@"
domcox@2 764 }
domcox@2 765
domcox@2 766 h5()
domcox@2 767 {
domcox@13 768 printf '<h5>%s</h5>\n' "$@"
domcox@2 769 }
domcox@2 770
domcox@2 771 label()
domcox@2 772 {
domcox@2 773 local setting="$1" label="$2" title="$3" name="$4" error=0
domcox@2 774 [ -z "$name" ] && name="$setting"
domcox@13 775 printf '<label for="%s"' "$name"
domcox@13 776 [ "$title" ] && printf ' title="%s">' "$title" || printf '%s' '>'
domcox@2 777 # display label in red in case of error
domcox@2 778 if [ "$CHECK" ]; then
domcox@2 779 /usr/sbin/tazinst check "$setting" "$INSTFILE"
domcox@2 780 error="$?"
domcox@2 781 [ "$error" -gt "0" ] && [ "$error" -lt "127" ] && \
domcox@13 782 printf '%s' '<span class="alert">'
domcox@13 783 printf '%s' "$label"
domcox@2 784 [ "$error" -gt "0" ] && [ "$error" -lt "127" ] && \
domcox@13 785 printf '%s' "<sup>*</sup></span>"
domcox@2 786 else
domcox@13 787 printf '%s' "$label"
domcox@2 788 fi
domcox@13 789 echo '</label>'
domcox@2 790 return "$error"
domcox@2 791 }
domcox@2 792
domcox@2 793 label_media()
domcox@2 794 {
domcox@2 795 local id="$1" label="$2" media="$3" title="$4" retcode=0
domcox@2 796 if [ "$media" == "$id" ]; then
al@6 797 label "source" \
al@6 798 "$label" \
al@6 799 "$title" \
al@6 800 "$media"
domcox@2 801 retcode="$?"
domcox@2 802 else
domcox@13 803 printf '<label for="%s"' "$id"
domcox@13 804 [ "$title" ] && printf ' title="%s">' "$title" || echo '>'
domcox@2 805 echo "$label</label>"
domcox@2 806 fi
domcox@2 807 return "$retcode"
domcox@2 808 }
domcox@2 809
domcox@2 810 error_msg()
domcox@2 811 {
domcox@2 812 local error="$1" setting="$2" line="$3"
domcox@2 813 if [ "$CHECK" ]; then
domcox@2 814 if [ "$error" -gt "0" ]; then
domcox@13 815 [ "$error" -lt "128" ] && printf '%s' '<span class="alert">' \
domcox@13 816 || printf '%s' '<span class="warning">'
domcox@2 817 if [ "$line" ]; then
domcox@2 818 /usr/sbin/tazinst check "$setting" "$INSTFILE" 2>&1 | \
domcox@2 819 /bin/busybox awk -v LINE="$line" '{if (NR==LINE){print}}'
domcox@2 820 else
domcox@2 821 /usr/sbin/tazinst check "$setting" "$INSTFILE" 2>&1
domcox@2 822 fi
domcox@13 823 echo '</span>'
domcox@2 824 fi
domcox@2 825 fi
domcox@2 826 }
domcox@2 827
domcox@2 828 select()
domcox@2 829 {
domcox@13 830 local list="$1" selected="$2" name="$3" type="$4"
domcox@13 831 printf '%s' "$list" | \
domcox@13 832 /bin/busybox awk -v SELECTED="$selected" -v NONE="$(gettext "None")" \
domcox@13 833 -v NAME="$name" -v TYPE="$type" 'BEGIN{
domcox@2 834 TYPE=TYPE+0
domcox@2 835 print "<select name=\"" NAME "\">"
domcox@2 836 print "<option value=>< " NONE " ></option>"
domcox@2 837 }
domcox@2 838 {
domcox@2 839 printf "<option value=\"" $1 "\""
domcox@2 840 if ($1 == SELECTED) printf " selected"
domcox@2 841 if (TYPE == 0)
domcox@2 842 print ">" $0 "</option>"
domcox@2 843 if (TYPE == 1)
domcox@2 844 print ">" substr($0,12) "</option>"
domcox@2 845 if (TYPE == 2)
domcox@2 846 print ">" $2 "</option>"
domcox@2 847 }
domcox@2 848 END{
domcox@2 849 print "</select>"
domcox@2 850 }'
domcox@2 851 }
domcox@2 852
domcox@2 853 input()
domcox@2 854 {
domcox@2 855 local type="$1" name="$2" value="$3" selected="$4" help="$5" action="$6"
domcox@13 856 printf '<input type="%s" id="%s" list="list_%s" ' "$type" "$name" "$name"
domcox@13 857 printf 'name="%s" class="%s" ' "$(printf $name | tr [a-z] [A-Z])" "$type"
domcox@13 858 [ "$value" ] && printf 'value="%s" ' "$value"
domcox@13 859 [ "$value" == "$selected" ] && printf '%s' "checked "
domcox@2 860 [ "$action" ] && printf \
domcox@13 861 'onInput="document.getElementById(%s).checked = true;" ' "'$action'"
domcox@13 862 [ "$help" ] && printf 'placeholder="%s" />\n' "$help" || echo "/>"
domcox@2 863 }
domcox@2 864
domcox@2 865 input_media()
domcox@2 866 {
domcox@2 867 local id="$1" media="$2"
domcox@13 868 printf '<input type="radio" name="MEDIA" value="%s" id="%s" ' "$id" "$id"
domcox@13 869 [ "$media" == "$id" ] && echo 'checked />' || echo '/>'
domcox@2 870 }
domcox@2 871
domcox@2 872 input_hidden()
domcox@2 873 {
domcox@13 874 local name="$1" value="$2"
domcox@13 875 printf '<input type="hidden" name="%s" value="%s" />\n' "$name" "$value"
domcox@2 876 }
domcox@2 877
domcox@2 878 datalist()
domcox@2 879 {
domcox@13 880 local list="$1" name="$2"
domcox@13 881 printf '<datalist id="list_%s">\n' "$name"
domcox@2 882 # workaround for browsers that don’t support the datalist element..
domcox@13 883 local script="displaySelValue(\"select_$name\",\"$name\")"
domcox@13 884 printf '<select class="workaround" id="select_%s" ' "$name"
domcox@13 885 printf "onChange='%s' onBlur='%s'>\n" "$script" "$script"
domcox@13 886
domcox@2 887 # workaround ..end
domcox@13 888 printf '%s' "$list" | \
domcox@13 889 /bin/busybox awk -v NONE="$(gettext "None")" 'BEGIN{
domcox@2 890 line=0
domcox@2 891 }
domcox@2 892 {
domcox@2 893 TEXT=$1
domcox@2 894 sub(".*/","",TEXT)
domcox@13 895 printf "<option value=\"%s\">%s</option>\n", $1, TEXT
domcox@2 896 line++
domcox@2 897 }
domcox@2 898 END{
domcox@2 899 if (line < 1)
domcox@13 900 printf "<option value=>< %s ></option>\n", NONE
domcox@2 901 }'
domcox@2 902 echo "</select>"
domcox@2 903 echo "</datalist>"
domcox@2 904 }
domcox@2 905
domcox@2 906 format()
domcox@2 907 {
al@6 908 list_fs="$1" selected="$2" name="$3" none="$(gettext 'Do not format')"
domcox@13 909 printf '<label for="%s" ' "$name"
domcox@13 910 printf 'title="%s">' "$(gettext "To format this partition, select a \
domcox@13 911 filesystem, usually it's safe to use ext4")"
domcox@13 912 printf '%s</label>\n' "$(gettext "Formatting option:")"
domcox@13 913 printf '%s' "$list_fs" | \
domcox@13 914 /bin/busybox awk -v SELECTED=$selected -v NONE="$none" -v NAME="$name" '
domcox@13 915 BEGIN{
domcox@2 916 RS=" "
domcox@2 917 print "<select name=\"" NAME "\">"
domcox@2 918 print "<option value=\"\">" NONE "</option>"
domcox@2 919 line=0
domcox@2 920 }
domcox@2 921 {
domcox@2 922 printf "<option value=\"" $1 "\""
domcox@2 923 if ($1 == SELECTED) printf " selected"
domcox@2 924 print ">" $0 "</option>"
domcox@2 925 line++
domcox@2 926 }
domcox@2 927 END{
domcox@2 928 if (line < 1)
domcox@2 929 print "<option value=>< " NONE " ></option>"
domcox@2 930 print "</select>"
domcox@2 931 }'
domcox@2 932 }
domcox@2 933
domcox@0 934 form_start()
domcox@0 935 {
domcox@13 936 printf '<form name="%s" method="get" ' "Form"
domcox@13 937 printf 'onsubmit="return true" action="%s">\n' "$SCRIPT_NAME"
domcox@0 938 }
domcox@0 939
domcox@0 940 form_end()
domcox@0 941 {
domcox@13 942 echo '</form>'
domcox@0 943 }
domcox@0 944
domcox@13 945 add_style()
domcox@2 946 {
domcox@13 947 printf '<!-- add specific styles -->
domcox@13 948 <style type="text/css">
domcox@13 949 .box label {
domcox@13 950 display:inline-block;
domcox@13 951 vertical-align:middle;
domcox@13 952 width: 130px;
domcox@13 953 }
domcox@13 954 .media label {
domcox@13 955 display:inline-block;
domcox@13 956 vertical-align:middle;
domcox@13 957 width: 110px;
domcox@13 958 }
domcox@13 959 .options label {
domcox@13 960 display:inline-block;
domcox@13 961 vertical-align:middle;
domcox@13 962 width: 140px;
domcox@13 963 }
domcox@13 964 .box .text {
domcox@13 965 width: 350px;
domcox@13 966 }
domcox@13 967 input {margin-bottom:3px;}
domcox@13 968 span.alert {color: red}
domcox@13 969 span.warning { color: darkgray}
domcox@13 970 #progress {
domcox@13 971 background-color: #f8f8f8;
domcox@13 972 border: 1px solid #ddd;
domcox@13 973 color: #666;
domcox@13 974 cursor: progress;
domcox@13 975 position: absolute;
domcox@13 976 width: 348px;
domcox@13 977 padding: 4px 4px 2px;
domcox@13 978 }
domcox@13 979 </style>
domcox@13 980 <!-- workaround for browsers that do not support the datalist element -->
domcox@13 981 <style type="text/css">
domcox@13 982 .workaround {width: 110px;}
domcox@13 983 </style>
domcox@13 984 <script>
domcox@13 985 function displaySelValue(selectId,inputId)
domcox@13 986 {
domcox@13 987 var slct = document.getElementById(selectId);
domcox@13 988 var input = document.getElementById(inputId);
domcox@13 989 document.getElementById("src_iso").value="";
domcox@13 990 document.getElementById("src_web").value="";
domcox@13 991 if (inputId =="src_iso"){
domcox@13 992 document.getElementById("iso").checked = true;
domcox@2 993 }
domcox@13 994 if (inputId =="src_web"){
domcox@13 995 document.getElementById("web").checked = true;
domcox@2 996 }
domcox@13 997 input.value = slct.options[slct.selectedIndex].value;
domcox@13 998 }
domcox@13 999 </script>
domcox@13 1000 <!-- datalist workaround end -->
domcox@13 1001 \n'
domcox@2 1002 }
domcox@2 1003
domcox@2 1004
domcox@0 1005 #
domcox@2 1006 # main
domcox@0 1007 #
domcox@0 1008
domcox@2 1009 header
domcox@2 1010
domcox@0 1011 case "$(GET page)" in
domcox@0 1012 home)
domcox@0 1013 xhtml_header
domcox@0 1014 select_action
domcox@0 1015 select_install
domcox@0 1016 select_upgrade
domcox@0 1017 ;;
domcox@2 1018 install)
domcox@2 1019 xhtml_header
domcox@2 1020 /usr/sbin/tazinst set mode install "$INSTFILE"
domcox@2 1021 page_redirection partitioning
domcox@2 1022 ;;
domcox@0 1023 partitioning)
domcox@0 1024 xhtml_header
domcox@2 1025 form_start
domcox@2 1026 display_mode
domcox@0 1027 select_gparted
domcox@2 1028 moveto_page home input
domcox@2 1029 form_end
domcox@0 1030 ;;
domcox@0 1031 gparted)
domcox@2 1032 exec_gparted
domcox@2 1033 xhtml_header
domcox@0 1034 page_redirection partitioning
domcox@0 1035 ;;
domcox@0 1036 upgrade)
domcox@0 1037 xhtml_header
domcox@2 1038 /usr/sbin/tazinst set mode upgrade "$INSTFILE"
domcox@2 1039 page_redirection input
domcox@2 1040 ;;
domcox@2 1041 input)
domcox@2 1042 xhtml_header
domcox@13 1043 add_style
domcox@2 1044 form_start
domcox@2 1045 display_mode
domcox@2 1046 select_settings
domcox@13 1047 moveto_page home execute
domcox@0 1048 form_end
domcox@0 1049 ;;
domcox@2 1050 execute)
domcox@0 1051 xhtml_header
domcox@2 1052 form_start
domcox@2 1053 display_mode
domcox@2 1054 save_settings
domcox@2 1055 if ! (/usr/sbin/tazinst check all $INSTFILE > /dev/null); then
domcox@2 1056 page_redirection "input&CHECK=yes"
domcox@0 1057 else
domcox@29 1058 tazinst_run && moveto_page home reboot \
domcox@29 1059 || moveto_page input failed
domcox@0 1060 fi
domcox@2 1061 form_end
domcox@0 1062 ;;
domcox@0 1063 reboot)
domcox@2 1064 /usr/sbin/tazinst clean "$INSTFILE"
domcox@0 1065 reboot ;;
domcox@0 1066 failed)
domcox@0 1067 xhtml_header
domcox@2 1068 form_start
domcox@2 1069 tazinst_log
domcox@2 1070 moveto_home
domcox@2 1071 form_end
domcox@0 1072 ;;
domcox@0 1073 *)
domcox@0 1074 xhtml_header
domcox@0 1075 if check_ressources; then
domcox@2 1076 /usr/sbin/tazinst new "$INSTFILE"
domcox@0 1077 page_redirection home
domcox@0 1078 fi
domcox@0 1079 ;;
domcox@0 1080 esac
domcox@0 1081
domcox@0 1082 xhtml_footer
domcox@0 1083
domcox@0 1084 exit 0