tazlito rev 400
live.cgi: explain hybrid ISO a bit
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Nov 21 10:21:42 2015 +0100 (2015-11-21) |
parents | d7aa98b45a0f |
children | 648f81279b2b |
files | live.cgi |
line diff
1.1 --- a/live.cgi Fri Nov 20 17:05:51 2015 +0200 1.2 +++ b/live.cgi Sat Nov 21 10:21:42 2015 +0100 1.3 @@ -37,7 +37,7 @@ 1.4 <menu> 1.5 <li><a data-icon="" href="live.cgi?liveusb" data-root>$(_ 'Create a live USB key')</a></li> 1.6 <li><a data-icon="" href="live.cgi#liveiso" data-root>$(_ 'Create a live CD-ROM')</a></li> 1.7 - <li><a data-icon="" href="live.cgi#hybrid" data-root>$(_ 'Create a hybrid ISO')</a></li> 1.8 + <li><a data-icon="" href="live.cgi#hybrid">$(_ 'Create a hybrid ISO')</a></li> 1.9 <li><a data-icon="" href="live.cgi#loram" data-root>$(_ 'Convert ISO to loram')</a></li> 1.10 <li><a data-icon="" href="live.cgi#meta" data-root>$(_ 'Build a meta ISO')</a></li> 1.11 </menu> 1.12 @@ -253,7 +253,7 @@ 1.13 TITLE="$(_ 'SliTaz Live Systems')" 1.14 xhtml_header "$(_ 'Create and manage Live CD or USB SliTaz systems')" 1.15 1.16 - cat <<EOT 1.17 + [ $(id -u) -eq 0 ] && cat <<EOT 1.18 1.19 <section id="liveiso"> 1.20 <header>$(_ 'Write a Live CD')</header> 1.21 @@ -278,14 +278,14 @@ 1.22 </table> 1.23 EOT 1.24 1.25 - if [ ! -d /media/cdrom/boot/isolinux -a ! -f /boot/*slitaz* ]; then 1.26 + if [ $(id -u) -eq 0 -a ! -d /media/cdrom/boot/isolinux -a ! -f /boot/*slitaz* ]; then 1.27 msg warn "$(_ 'Cannot find SliTaz ISO/CD mounted in /media/cdrom (You will get only rootfs.gz)')" 1.28 fi 1.29 1.30 inputiso="$(GET input)"; inputiso="${inputiso:-/root/}" 1.31 loramoutput="$(GET loramoutput)"; loramoutput="${loramoutput:-/root/loram.iso}" 1.32 1.33 - cat <<EOT 1.34 + [ $(id -u) -eq 0 ] && cat <<EOT 1.35 <footer> 1.36 <button type="submit" data-icon="cd">$(_ 'Write ISO')</button> 1.37 </footer> 1.38 @@ -302,7 +302,7 @@ 1.39 <form method="get" action="$SCRIPT_NAME#loram" class="wide"> 1.40 <div> 1.41 $(_ "This command will convert an ISO image of a SliTaz Live CD to a \ 1.42 -new ISO image requiring less RAM to run.") 1.43 +new ISO image requiring less RAM to run.") (-30%) 1.44 </div> 1.45 1.46 <table> 1.47 @@ -335,8 +335,8 @@ 1.48 cdrom) sel='type3';; 1.49 *) sel='type1';; 1.50 esac 1.51 - echo "document.getElementById('$sel').checked = true;" 1.52 - cat <<EOT 1.53 + [ $(id -u) -eq 0 ] echo "document.getElementById('$sel').checked = true;" 1.54 + [ $(id -u) -eq 0 ] && cat <<EOT 1.55 </script> 1.56 1.57 <footer> 1.58 @@ -345,6 +345,8 @@ 1.59 </form> 1.60 </section> 1.61 1.62 +EOT 1.63 + cat <<EOT 1.64 1.65 <section id="hybrid"> 1.66 <header>$(_ 'Build a hybrid ISO')</header> 1.67 @@ -352,12 +354,18 @@ 1.68 <form method="get" action="$SCRIPT_NAME#hybrid" class="wide"> 1.69 <div> 1.70 $(_ "Add a master boot sector and an EXE header to the ISO image.") 1.71 + <ul> 1.72 +<li>$(_ "Create a bootable image for USB key, memory card, harddisk or SSD.")</li> 1.73 +<li>$(_ "With the .EXE suffix, it will run under DOS (16 bits) or Windows (32 bits).")</li> 1.74 +<li>$(_ "Add ISO filesystem md5 digest and boot CRC in ISO boot area.")</li> 1.75 +<li>$(_ "Does not alter ISO image size or ISO filesystem.")</li> 1.76 + </ul> 1.77 </div> 1.78 1.79 <table> 1.80 <tr><td> 1.81 $(_ 'ISO to convert') 1.82 - <input type="text" name="input" value="/root/" /> 1.83 + <input type="text" name="input" value="$([ $(id -u) -eq 0 ] && echo "/root" || echo $HOME)/" /> 1.84 </td></tr> 1.85 </table> 1.86 1.87 @@ -367,6 +375,8 @@ 1.88 </form> 1.89 </section> 1.90 1.91 +EOT 1.92 + [ $(id -u) -eq 0 ] && cat <<EOT 1.93 1.94 <section id="meta"> 1.95 <header>$(_ 'Build a meta ISO')</header> 1.96 @@ -383,7 +393,7 @@ 1.97 while [ -n "$(GET addmeta)" ]; do 1.98 [ -n "$(GET input$i)" ] || break 1.99 j=$(($i + 1)) 1.100 - cat <<EOT 1.101 + [ $(id -u) -eq 0 ] && cat <<EOT 1.102 <tr> 1.103 <td> 1.104 $(_ 'ISO number %s:' "$j") $(GET input$i) 1.105 @@ -400,7 +410,7 @@ 1.106 metaoutput="$(GET metaoutput)" 1.107 [ -n "$metaoutput" ] || metaoutput="/root/meta.iso" 1.108 1.109 - cat <<EOT 1.110 + [ $(id -u) -eq 0 ] && cat <<EOT 1.111 <tr> 1.112 <td> 1.113 $(_ 'ISO to add')