tazpanel view live.cgi @ rev 29

Add support for write-iso in live.cgi with nice select box :-)
author Christophe Lincoln <pankso@slitaz.org>
date Tue Apr 05 03:35:45 2011 +0200 (2011-04-05)
parents 79c49d85215d
children 55ce67f05cf9
line source
1 #!/bin/sh
2 #
3 # CGI interface for SliTaz Live systems using Tazlito and TazUSB.
4 #
5 echo "Content-Type: text/html"
6 echo ""
8 # Common functions from libtazpanel
9 . lib/libtazpanel
10 get_config
12 # Include gettext helper script.
13 . /usr/bin/gettext.sh
15 # Export package name for gettext.
16 TEXTDOMAIN='tazpanel-live'
17 export TEXTDOMAIN
19 TITLE="- Live"
21 #
22 # Commands executed in Xterm first
23 #
25 case "$QUERY_STRING" in
26 write-iso=*)
27 COMPRESSION=${QUERY_STRING#write-iso=}
28 xterm $XTERM_OPTS \
29 -title "write-iso" \
30 -e "tazlito writeiso $COMPRESSION" & ;;
31 *)
32 continue ;;
33 esac
35 #
36 # Commands
37 #
39 case "$QUERY_STRING" in
40 create)
41 #
42 # Create a flavor file and ISO in option with all settings
43 #
44 gettext "TODO" ;;
45 *)
46 #
47 # Default xHTML content
48 #
49 xhtml_header
50 cat << EOT
51 <div id="wrapper">
52 <h2>`gettext "SliTaz Live Systems"`</h2>
53 <p>`gettext "Create and manage Live CD or USB SliTaz systems"`<p>
54 </div>
56 <h3>`gettext "Write an ISO"`</h3>
57 <p>
58 `gettext "Writeiso will generate an ISO image of the current filesystem
59 as is, including the /home directory. It is an easy way to remaster a
60 SliTaz Live system, you just have to: boot, modify, writeiso."`
61 </p>
62 <form method="get" action="$SCRIPT_NAME">
63 `gettext "Compression type:"`
64 <select name="write-iso">
65 <option value="gzip">gzip</option>
66 <option value="lzma">lzma</option>
67 <option value="none">none</option>
68 </select>
69 <input type="submit" value="`gettext "write ISO"`" />
70 </form
71 EOT
72 ;;
73 esac
75 xhtml_footer
76 exit 0