tazlito diff live.cgi @ rev 383
live.cgi: restore <!--writeiso-->
author | Xander Ziiryanoff <psychomaniak@xakep.ru> |
---|---|
date | Thu May 07 03:29:30 2015 +0300 (2015-05-07) |
parents | d5a2a2af1fdd |
children | 847a1a024cd0 |
line diff
1.1 --- a/live.cgi Tue May 05 09:11:31 2015 +0200 1.2 +++ b/live.cgi Thu May 07 03:29:30 2015 +0300 1.3 @@ -76,10 +76,6 @@ 1.4 # 1.5 1.6 case " $(GET) " in 1.7 - *\ write_iso\ *) 1.8 - $TERMINAL $TERM_OPTS \ 1.9 - -T "write-iso" \ 1.10 - -e "tazlito writeiso $(GET write_iso)" & ;; 1.11 *\ loramoutput\ *) 1.12 $TERMINAL $TERM_OPTS \ 1.13 -T "build loram iso" \ 1.14 @@ -147,12 +143,61 @@ 1.15 yes | tazusb gen-liveusb $(GET gen) 1.16 echo '</pre>' 1.17 fi ;; 1.18 + *\ write_iso\ *) 1.19 + xhtml_header 1.20 + 1.21 + LaunchedByTazpanel="y" \ 1.22 + tazlito writeiso $(GET write_iso) > /tmp/tazlitowriteiso 2>&1 & 1.23 + 1.24 + until [ -f /rootfs.gz ]; do 1.25 + sleep 1 1.26 + done 1.27 + cat << EOT 1.28 +<fieldset> 1.29 +$(head /tmp/tazlitowriteiso | sed "s|$|<p></p>|g" | sed '/.gvfs/d') 1.30 +<li id="fssize"> </li> 1.31 +EOT 1.32 + until [ ! -f /rootfs.gz ]; do 1.33 + sleep 1 1.34 + cat << EOT 1.35 +<script type="text/javascript"> 1.36 +document.getElementById('fssize').innerHTML = "<h4>$(boldify $(du -mh /rootfs.gz | cut -f1))</h4>"; 1.37 +</script> 1.38 +EOT 1.39 + done 1.40 + if [ -f /rootfs.gz ]; then 1.41 + until [ ! -f /rootfs.gz ]; do 1.42 + sleep 1 1.43 + done 1.44 + fi 1.45 + cat <<EOT 1.46 +<script type="text/javascript"> 1.47 +document.getElementById('fssize').innerHTML = "$(boldify $(du -mh /home/slitaz/distro/rootcd/boot/rootfs.gz | cut -f1))"; 1.48 +</script> 1.49 +/home/slitaz/distro/rootcd/boot/rootfs.gz 1.50 +</fieldset> 1.51 +EOT 1.52 + until [ -f /tmp/.write-iso* ]; do 1.53 + sleep 1 1.54 + done 1.55 + echo "<fieldset>" 1.56 + if [ -f /tmp/.write-iso ]; then 1.57 + newline 1.58 + tail /tmp/tazlitowriteiso | grep ISO 1.59 + while [ -f /tmp/.write-iso ]; do sleep 1 ; done 1.60 + elif [ -f /tmp/.write-iso-error ]; then 1.61 + tail -n8 /tmp/tazlitowriteiso | grep -vE 'ENTER|----' 1.62 + fi 1.63 + tail -n5 /tmp/tazlitowriteiso | sed "s|$|<p></p>|g" 1.64 + echo "</fieldset>" 1.65 + echo "Use ' <code>tazlito emu-iso</code> ' to check it" ;; 1.66 *) 1.67 # 1.68 # Default xHTML content 1.69 # 1.70 xhtml_header 1.71 cat << EOT 1.72 +<header id="liveiso"> <header> 1.73 <div id="wrapper"> 1.74 <h2>$(gettext 'SliTaz Live Systems')</h2> 1.75 <p>$(gettext 'Create and manage Live CD or USB SliTaz systems')<p> 1.76 @@ -163,10 +208,12 @@ 1.77 <img src="$IMAGES/harddisk.png" />$(gettext 'Create LiveUSB')</a> 1.78 </div> 1.79 1.80 +<fieldset > 1.81 +<h3 id="loram">$(gettext 'Write a Live CD')</h3> 1.82 1.83 -<!-- 1.84 -<h3 id="livecd">$(gettext 'Write a Live CD')</h3> 1.85 +<!-- id="livecd" --> 1.86 1.87 +<div> 1.88 <p>$(gettext "The command writeiso will generate an ISO image of the current \ 1.89 filesystem as is, including all files in the /home directory. It is an easy \ 1.90 way to remaster a SliTaz Live system, you just have to: boot, modify, \ 1.91 @@ -180,12 +227,21 @@ 1.92 <option value="none">$(gettext 'none')</option> 1.93 </select> 1.94 <input type="submit" value="$(gettext 'Write ISO')" /> 1.95 -</form> --> 1.96 +</form> 1.97 +$([ ! -d /media/cdrom/boot/isolinux -a ! -f /boot/*slitaz* ] && \ 1.98 +echo '<p> Cannot find Slitaz ISO/cd mounted in /media/cdrom (You will get only rootfs.gz)</p>') 1.99 +</div> 1.100 +</fieldset> 1.101 1.102 +<p></p> 1.103 +<fieldset> 1.104 1.105 <h3>$(gettext 'Live CD tools')</h3> 1.106 1.107 -<h4 id="loram">$(gettext 'Convert ISO to loram')</h4> 1.108 +<fieldset> 1.109 +<h4>$(gettext 'Convert ISO to loram')</h4> 1.110 + 1.111 +<!-- id="loram" --> 1.112 1.113 <p>$(gettext "This command will convert an ISO image of a SliTaz Live CD to a \ 1.114 new ISO image requiring less RAM to run.")</p> 1.115 @@ -219,8 +275,9 @@ 1.116 </table> 1.117 <input type="submit" value="$(gettext 'Convert ISO to loram')" /> 1.118 </form> 1.119 +</fieldset> 1.120 1.121 - 1.122 +<fieldset> 1.123 <h4 id="hybrid">$(gettext 'Build a hybrid ISO')</h4> 1.124 1.125 <p>$(gettext "Add a master boot sector and an EXE header to the ISO image. \ 1.126 @@ -237,7 +294,9 @@ 1.127 </table> 1.128 <input type="submit" name="hybrid" value="$(gettext 'Build a hybrid ISO')" /> 1.129 </form> 1.130 +</fieldset> 1.131 1.132 +<fieldset> 1.133 <h4 id="meta">$(gettext 'Build a meta ISO')</h4> 1.134 1.135 <p>$(gettext "Combines several ISO flavors like nested Russian dolls. The \ 1.136 @@ -283,6 +342,8 @@ 1.137 </table> 1.138 <input type="submit" name="meta" value="$(gettext 'Build a meta ISO')" /> 1.139 </form> 1.140 +</fieldset> 1.141 +</fieldset> 1.142 1.143 EOT 1.144 ;;