tazpanel annotate live.cgi @ rev 39
Fix TEXTDOMAIN for *.cgi
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Wed Apr 06 06:09:34 2011 +0200 (2011-04-06) |
parents | 55ce67f05cf9 |
children | cf15cb2ff715 |
rev | line source |
---|---|
pankso@24 | 1 #!/bin/sh |
pankso@24 | 2 # |
pankso@24 | 3 # CGI interface for SliTaz Live systems using Tazlito and TazUSB. |
pankso@24 | 4 # |
pankso@24 | 5 echo "Content-Type: text/html" |
pankso@24 | 6 echo "" |
pankso@24 | 7 |
pankso@24 | 8 # Common functions from libtazpanel |
pankso@24 | 9 . lib/libtazpanel |
pankso@24 | 10 get_config |
pankso@24 | 11 |
pankso@24 | 12 # Include gettext helper script. |
pankso@24 | 13 . /usr/bin/gettext.sh |
pankso@24 | 14 |
pankso@24 | 15 # Export package name for gettext. |
pankso@39 | 16 TEXTDOMAIN='tazpanel' |
pankso@24 | 17 export TEXTDOMAIN |
pankso@24 | 18 |
pankso@25 | 19 TITLE="- Live" |
pankso@25 | 20 |
pankso@24 | 21 # |
pankso@29 | 22 # Commands executed in Xterm first |
pankso@29 | 23 # |
pankso@29 | 24 |
pankso@29 | 25 case "$QUERY_STRING" in |
pankso@29 | 26 write-iso=*) |
pankso@30 | 27 comp=${QUERY_STRING#write-iso=} |
pankso@29 | 28 xterm $XTERM_OPTS \ |
pankso@30 | 29 -T "write-iso" \ |
pankso@30 | 30 -e "tazlito writeiso $comp" & ;; |
pankso@30 | 31 gen-liveusb=*) |
pankso@30 | 32 dev=`httpd -d ${QUERY_STRING#gen-liveusb=}` |
pankso@30 | 33 xterm $XTERM_OPTS \ |
pankso@30 | 34 -T "Tazusb gen-liveusb" \ |
pankso@30 | 35 -e "tazusb gen-liveusb $dev; \ |
pankso@30 | 36 gettext \"ENTER to quit\"; read i" & ;; |
pankso@29 | 37 *) |
pankso@29 | 38 continue ;; |
pankso@29 | 39 esac |
pankso@29 | 40 |
pankso@29 | 41 # |
pankso@24 | 42 # Commands |
pankso@24 | 43 # |
pankso@24 | 44 |
pankso@24 | 45 case "$QUERY_STRING" in |
pankso@29 | 46 create) |
pankso@29 | 47 # |
pankso@29 | 48 # Create a flavor file and ISO in option with all settings |
pankso@29 | 49 # |
pankso@29 | 50 gettext "TODO" ;; |
pankso@24 | 51 *) |
pankso@24 | 52 # |
pankso@24 | 53 # Default xHTML content |
pankso@24 | 54 # |
pankso@24 | 55 xhtml_header |
pankso@24 | 56 cat << EOT |
pankso@24 | 57 <div id="wrapper"> |
pankso@25 | 58 <h2>`gettext "SliTaz Live Systems"`</h2> |
pankso@24 | 59 <p>`gettext "Create and manage Live CD or USB SliTaz systems"`<p> |
pankso@24 | 60 </div> |
pankso@24 | 61 |
pankso@30 | 62 <h3>`gettext "Write a Live CD"`</h3> |
pankso@29 | 63 <p> |
pankso@30 | 64 `gettext "The command writeiso will generate an ISO image of the |
pankso@30 | 65 current filesystem as is, including all files in the /home directory. |
pankso@30 | 66 It is an easy way to remaster a SliTaz Live system, you just have |
pankso@30 | 67 to: boot, modify, writeiso."` |
pankso@29 | 68 </p> |
pankso@29 | 69 <form method="get" action="$SCRIPT_NAME"> |
pankso@29 | 70 `gettext "Compression type:"` |
pankso@29 | 71 <select name="write-iso"> |
pankso@29 | 72 <option value="gzip">gzip</option> |
pankso@29 | 73 <option value="lzma">lzma</option> |
pankso@29 | 74 <option value="none">none</option> |
pankso@29 | 75 </select> |
pankso@29 | 76 <input type="submit" value="`gettext "write ISO"`" /> |
pankso@30 | 77 </form> |
pankso@30 | 78 |
pankso@30 | 79 <h3>`gettext "Live USB"`</h3> |
pankso@30 | 80 <p> |
pankso@30 | 81 `gettext "Generate SliTaz LiveUSB media and boot in RAM! Insert a |
pankso@30 | 82 LiveCD into the cdrom drive, select the correct device and press |
pankso@30 | 83 Generate."` |
pankso@30 | 84 </p> |
pankso@30 | 85 <form method="get" action="$SCRIPT_NAME"> |
pankso@30 | 86 `gettext "USB Media to use:"` |
pankso@30 | 87 <select name="gen-liveusb"> |
pankso@30 | 88 EOT |
pankso@30 | 89 # List disk if plugged USB device |
pankso@30 | 90 if [ -d /proc/scsi/usb-storage ]; then |
pankso@30 | 91 for i in `blkid | cut -d ":" -f 1`; do |
pankso@30 | 92 echo "<option value='$i'>$i</option>" |
pankso@30 | 93 done |
pankso@30 | 94 else |
pankso@30 | 95 echo "<option value="">"`gettext "Not found"`"</option>" |
pankso@30 | 96 fi |
pankso@30 | 97 cat << EOT |
pankso@30 | 98 </select> |
pankso@30 | 99 <input type="submit" value="`gettext "generate"`" /> |
pankso@30 | 100 </form> |
pankso@30 | 101 |
pankso@24 | 102 EOT |
pankso@24 | 103 ;; |
pankso@24 | 104 esac |
pankso@24 | 105 |
pankso@24 | 106 xhtml_footer |
pankso@24 | 107 exit 0 |