tazpanel view network.cgi @ rev 432

libtazpanel: fix keymap list
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Apr 06 17:22:23 2015 +0200 (2015-04-06)
parents 299f204b8f1f
children a686450b8e9e
line source
1 #!/bin/sh
2 #
3 # Network configuration CGI interface
4 #
5 # Copyright (C) 2012-2015 SliTaz GNU/Linux - BSD License
6 #
9 # Common functions from libtazpanel
11 . lib/libtazpanel
12 get_config
13 header
15 TITLE=$(gettext 'TazPanel - Network')
18 # Start a Wi-Fi connection
20 start_wifi() {
21 sed -i \
22 -e 's|^WIFI=.*|WIFI="yes"|' \
23 -e 's|^DHCP=.*|DHCP="yes"|' \
24 -e 's|^STATIC=.*|STATIC="no"|' /etc/network.conf
25 ifconfig $WIFI_INTERFACE up
26 iwconfig $WIFI_INTERFACE txpower auto
27 /etc/init.d/network.sh restart | log
28 # Sleep until connection established (max 20 seconds)
29 for i in $(seq 20); do
30 [ -n "$(iwconfig 2>/dev/null | fgrep Link)" ] && break
31 sleep 1
32 done
33 }
36 # Connect to a Wi-Fi network
37 connect_wifi() {
38 /etc/init.d/network.sh stop | log
39 sed -i \
40 -e "s|^WIFI_ESSID=.*|WIFI_ESSID=\"$(GET essid)\"|" \
41 -e "s|^WIFI_BSSID=.*|WIFI_BSSID=\"$(GET bssid)\"|" \
42 -e "s|^WIFI_KEY_TYPE=.*|WIFI_KEY_TYPE=\"$(GET keyType)\"|" \
43 -e "s|^WIFI_KEY=.*|WIFI_KEY=\"$(GET password)\"|" \
44 -e "s|^WIFI_EAP_METHOD=.*|WIFI_EAP_METHOD=\"$(GET eap)\"|" \
45 -e "s|^WIFI_CA_CERT=.*|WIFI_CA_CERT=\"$(GET caCert)\"|" \
46 -e "s|^WIFI_CLIENT_CERT=.*|WIFI_CLIENT_CERT=\"$(GET clientCert)\"|" \
47 -e "s|^WIFI_IDENTITY=.*|WIFI_IDENTITY=\"$(GET identity)\"|" \
48 -e "s|^WIFI_ANONYMOUS_IDENTITY=.*|WIFI_ANONYMOUS_IDENTITY=\"$(GET anonymousIdentity)\"|" \
49 -e "s|^WIFI_PHASE2=.*|WIFI_PHASE2=\"$(GET phase2)\"|" \
50 /etc/network.conf
51 . /etc/network.conf
52 start_wifi
53 }
56 # Start an Ethernet connection
58 start_eth() {
59 case "$(GET staticip)" in
60 on) DHCP='no'; STATIC='yes';;
61 *) DHCP='yes'; STATIC='no';;
62 esac
64 /etc/init.d/network.sh stop | log
65 sleep 2
66 sed -i \
67 -e "s|^INTERFACE=.*|INTERFACE=\"$(GET iface)\"|" \
68 -e 's|^WIFI=.*|WIFI="no"|' \
69 -e "s|^DHCP=.*|DHCP=\"$DHCP\"|" \
70 -e "s|^STATIC=.*|STATIC=\"$STATIC\"|" \
71 -e "s|^IP=.*|IP=\"$(GET ip)\"|" \
72 -e "s|^NETMASK=.*|NETMASK=\"$(GET netmask)\"|" \
73 -e "s|^GATEWAY=.*|GATEWAY=\"$(GET gateway)\"|" \
74 -e "s|^DNS_SERVER=.*|DNS_SERVER=\"$(GET dns)\"|" \
75 /etc/network.conf
76 /etc/init.d/network.sh start | log
77 . /etc/network.conf
78 }
81 # Use /etc/wpa/wpa.conf as single database for known networks, passwords, etc.
82 # Translate this data to use in javascript.
84 parse_wpa_conf() {
85 awk '
86 BEGIN { print "networks = ["; begin_list = 1; network = 0; }
87 {
88 if ($0 == "network={") {
89 if (begin_list == 0) print ",";
90 begin_list = 0;
91 printf "{"; begin_obj = 1;
92 network = 1; next;
93 }
94 if (network == 1) {
95 if ($0 ~ "=") {
96 if (begin_obj == 0) printf ", ";
97 begin_obj = 0;
98 split($0, a, "=");
99 if (a[2] ~ "\"")
100 printf "%s:%s", a[1], a[2];
101 else
102 printf "%s:\"%s\"", a[1], a[2];
103 }
104 }
105 if (network == 1 && $0 ~ "}") { printf "}"; network = 0; next; }
106 }
107 END {print "\n];"}
108 ' /etc/wpa/wpa.conf | sed 's|\t||g;'
109 }
112 # Waiting for network link up
114 wait_up() {
115 for i in $(seq 10); do
116 [ -z "$(cat /sys/class/net/*/operstate | fgrep up)"] && sleep 1
117 done
118 }
120 # Actions commands before page is displayed
122 case " $(GET) " in
123 *\ start\ *)
124 /etc/init.d/network.sh start | log
125 # Here we sleep a bit to let udhcp get the lease before reloading
126 # the page with status
127 wait_up ;;
128 *\ stop\ *)
129 /etc/init.d/network.sh stop | log ;;
130 *\ restart\ *)
131 /etc/init.d/network.sh restart | log
132 wait_up ;;
133 *\ start_wifi\ *)
134 start_wifi ;;
135 *\ start_eth\ *)
136 start_eth ;;
137 *\ connect_wifi\ *)
138 connect_wifi ;;
139 *\ host\ *)
140 get_hostname="$(GET host)"
141 echo $(eval_gettext 'Changed hostname: $get_hostname') | log
142 echo "$get_hostname" > /etc/hostname ;;
143 esac
146 # Get values only now since they could have been modified by actions.
148 . /etc/network.conf
154 #
155 # Main Commands for pages
156 #
158 case " $(GET) " in
160 *\ scan\ *)
161 # Scan open ports
162 scan=$(GET scan); back=$(GET back)
163 xhtml_header
164 LOADING_MSG=$(gettext 'Scanning open ports...'); loading_msg
166 cat <<EOT
167 <section>
168 <header>
169 $(eval_gettext 'Port scanning for $scan')
170 $(back_button "$back" "$(gettext 'Network')" "")
171 </header>
172 <pre>$(pscan -b $scan)</pre>
173 </section>
174 EOT
175 ;;
178 *\ eth\ *)
179 # Wired connections settings
180 xhtml_header
182 PAR1="size=\"20\" required"; PAR="$PAR1 pattern=\"\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\""
184 case "$STATIC" in
185 yes) use_static='checked';;
186 *) use_static='';;
187 esac
189 stop_disabled=''; start_disabled=''
190 if cat /sys/class/net/eth*/operstate | fgrep -q up; then
191 start_disabled='disabled'
192 else
193 stop_disabled='disabled'
194 fi
196 cat <<EOT
197 <h2>$(gettext 'Ethernet connection')</h2>
199 <p>$(gettext "Here you can configure a wired connection using DHCP to \
200 automatically get a random IP or configure a static/fixed IP")</p>
202 <section>
203 <header>$(gettext 'Configuration')</header>
204 <form id="conf">
205 <input type="hidden" name="eth"/>
206 <div>
207 <table>
208 <tr><td>$(gettext 'Interface')</td>
209 <td><select name="iface" value="$INTERFACE" style="width:100%">
210 $(cd /sys/class/net; ls -1 | awk -viface="$INTERFACE" '{
211 sel = ($0 == iface) ? " selected":""
212 printf "<option value=\"%s\"%s>%s", $0, sel, $0
213 }')
214 </select></td>
215 </tr>
216 <tr><td>$(gettext 'Static IP')</td>
217 <td><label><input type="checkbox" name="staticip" id="staticip" $use_static/>
218 $(gettext 'Use static IP')</td>
219 </tr>
220 <tr id="st1"><td>$(gettext 'IP address')</td>
221 <td><input type="text" name="ip" value="$IP" $PAR/></td>
222 </tr>
223 <tr id="st2"><td>$(gettext 'Netmask')</td>
224 <td><input type="text" name="netmask" value="$NETMASK" $PAR/></td>
225 </tr>
226 <tr id="st3"><td>$(gettext 'Gateway')</td>
227 <td><input type="text" name="gateway" value="$GATEWAY" $PAR/></td>
228 </tr>
229 <tr id="st4"><td>$(gettext 'DNS server')</td>
230 <td><input type="text" name="dns" value="$DNS_SERVER" $PAR/></td>
231 </tr>
232 </table>
233 </div>
234 </form>
235 <footer><!--
236 --><button form="conf" type="submit" name="start_eth" data-icon="start" $start_disabled>$(gettext 'Start' )</button><!--
237 --><button form="conf" type="submit" name="stop" data-icon="stop" $stop_disabled >$(gettext 'Stop' )</button><!--
238 --></footer>
239 </section>
241 <script type="text/javascript">
242 function static_change() {
243 staticip = document.getElementById('staticip').checked;
244 for (i = 1; i < 5; i++) {
245 document.getElementById('st' + i).style.display = staticip ? '' : 'none';
246 }
247 }
249 document.getElementById('staticip').onchange = static_change;
250 static_change();
251 </script>
253 <section>
254 <header>
255 $(gettext 'Configuration file')
256 <form action="index.cgi">
257 <input type="hidden" name="file" value="/etc/network.conf"/>
258 <button name="action" value="edit" data-icon="edit">$(gettext 'Edit')</button>
259 </form>
260 </header>
261 <div>$(gettext "These values are the ethernet settings in the main /etc/network.conf configuration file")</div>
262 <pre>$(awk '{if($1 !~ "WIFI" && $1 !~ "#" && $1 != ""){print $0}}' /etc/network.conf | syntax_highlighter conf)</pre>
263 </section>
264 EOT
265 ;;
269 *\ wifi_list\ *)
270 # Catch ESSIDs and format output.
271 # We get the list of networks by Cell and without spaces.
273 HIDDEN="$(gettext '(hidden)')"
275 cat <<EOT
276 <table class="wide center zebra">
277 <thead>
278 <tr>
279 <td>$(gettext 'Name')</td>
280 <td>$(gettext 'Signal level')</td>
281 <td>$(gettext 'Channel')</td>
282 <td>$(gettext 'Encryption')</td>
283 <td>$(gettext 'Status')</td>
284 </tr>
285 </thead>
286 <tbody>
287 EOT
288 if [ -d /sys/class/net/$WIFI_INTERFACE/wireless ]; then
289 ifconfig $WIFI_INTERFACE up
290 for i in $(iwlist $WIFI_INTERFACE scan | sed '/Cell /!d;s/.*Cell \([^ ]*\).*/Cell.\1/')
291 do
292 SCAN=$(iwlist $WIFI_INTERFACE scan last | sed "/$i/,/Cell/!d" | sed '$d')
294 BSSID=$(echo "$SCAN" | sed -n 's|.*Address: \([^ ]*\).*|\1|p')
296 CHANNEL=$(echo "$SCAN" | sed -n 's|.*Channel[:=]\([^ ]*\).*|\1|p')
298 QUALITY=$(echo "$SCAN" | sed -n 's|.*Quality[:=]\([^ ]*\).*|\1|p')
299 QUALITY_ICON="lvl$(( 5*${QUALITY:-0} ))" # lvl0 .. lvl4, lvl5
300 LEVEL=$(echo "$SCAN" | sed -n 's|.*Signal level[:=]\([^ ]*\).*|\1|p; s|-|−|')
302 ENCRYPTION=$(echo "$SCAN" | sed -n 's|.*Encryption key[:=]\([^ ]*\).*|\1|p') # on/off
304 ESSID=$(echo "$SCAN" | sed -n 's|.*ESSID:"\([^"]*\).*|\1|p')
306 # WPA Type - Group Cipher - Pairwise Ciphers - Authentication Suites
307 # {WPA|WPA2}-{TKIP|CCMP}-{TKIP|CCMP|TKIP CCMP}-{PSK|802.1x}
308 #CAPABILITIES="$(echo "$SCAN" | grep -e 'IE: .*WPA*' -A3 | cut -d: -f2 | sed -e 's|^ ||' -e '/WPA2/s|.*|=WPA2|' -e '/WPA /s|.*|=WPA|' -e '/--/d' | tr '\n' '-' | tr '=' '\n' | sed -e '/^$/d' -e 's|-$||')"
310 # Authentication type
311 AUTH="$(echo "$SCAN" | sed -n 's|.*Authentication Suites[^:]*: *\(.*\)|\1|p')"
312 if [ -n "$(echo -n $AUTH | fgrep PSK)" ]; then
313 # WPA-Personal. Authentication using password (PSK = pre-shared key)
314 WIFI_KEY_TYPE='WPA'
315 elif [ -n "$(echo -n $AUTH | fgrep 802.1x)" ]; then
316 # WPA-Enterprise. Authentication using username, password, certificates...
317 WIFI_KEY_TYPE='EAP'
318 else
319 WIFI_KEY_TYPE='NONE'
320 fi
322 # Check encryption type
323 if [ "$ENCRYPTION" == 'on' ]; then
324 # "WPA" or "WPA2" or "WPA/WPA2" (maybe also "WPA2/WPA")
325 ENC_SIMPLE=$(echo "$SCAN" | sed -n '/.*WPA.*/ s|.*\(WPA[^ ]*\).*|\1|p')
326 ENC_SIMPLE=$(echo $ENC_SIMPLE | sed 's| |/|')
327 ENC_ICON='sechi' # high
328 if [ -z "$ENC_SIMPLE" ]; then
329 WIFI_KEY_TYPE='WEP'
330 ENC_SIMPLE='WEP'; ENC_ICON='secmi' # middle
331 fi
332 else
333 WIFI_KEY_TYPE='NONE'
334 ENC_SIMPLE="$(gettext 'None')"; ENC_ICON='seclo' # low
335 fi
337 #
338 #if echo $SCAN | grep -q 'Mode:Managed'; then
339 # AP="&amp;ap=$(echo $SCAN | sed 's/.*Address: \([^ ]*\).*/\1/')"
340 #else
341 # AP=''
342 #fi
344 # Connected or not connected...
345 if ifconfig $WIFI_INTERFACE | fgrep -q inet && \
346 iwconfig $WIFI_INTERFACE | fgrep -q "ESSID:\"$ESSID\""; then
347 status="$(gettext 'Connected')"
348 else
349 status='---'
350 fi
352 cat <<EOT
353 <tr>
354 <td><a data-icon="wifi" onclick="loadcfg('$ESSID', '$BSSID', '$WIFI_KEY_TYPE')">${ESSID:-$HIDDEN}</a></td>
355 <td><span data-icon="$QUALITY_ICON" title="Quality: $QUALITY"> $LEVEL dBm</span></td>
356 <td>$CHANNEL</td>
357 <td><span data-icon="$ENC_ICON">$ENC_SIMPLE</span></td>
358 <td>$status</td>
359 </tr>
360 EOT
361 done
362 fi
363 cat <<EOT
364 </tbody>
365 </table>
366 EOT
367 exit 0
368 ;;
371 *\ wifi\ *)
372 # Wireless connections settings
373 xhtml_header
375 . /etc/network.conf
376 cat <<EOT
377 <h2>$(gettext 'Wireless connection')</h2>
379 <form>
380 <input type="hidden" name="wifi"/>
381 EOT
383 start_disabled=''; stop_disabled=''
384 if iwconfig 2>/dev/null | grep -q 'Tx-Power=off'; then
385 stop_disabled='disabled'
386 else
387 start_disabled='disabled'
388 fi
390 cat <<EOT
391 <button name="start_wifi" data-icon="start" $start_disabled>$(gettext 'Start')</button><!--
392 --><button name="stop" data-icon="stop" $stop_disabled >$(gettext 'Stop' )</button><!--
393 --><button type="submit" data-icon="refresh" $stop_disabled >$(gettext 'Scan' )</button>
394 </form>
395 EOT
397 if [ -n "$start_disabled" ]; then
398 cat <<EOT
399 <section id="wifiList">
400 <div style="text-align: center;"><span id="ajaxStatus"></span>$(gettext 'Scanning wireless interface...')</div>
401 </section>
403 <script type="text/javascript">
404 ajax('/network.cgi?wifi_list', '1', 'wifiList');
405 $(parse_wpa_conf)
406 </script>
407 EOT
409 # ESSID names are clickable
410 #SELECT="$(GET select)"
411 #if [ -n "$SELECT" ]; then
412 # [ "$SELECT" != "$WIFI_ESSID" ] && WIFI_KEY=''
413 # WIFI_ESSID="$SELECT"
414 #fi
416 cat <<EOT
417 <section>
418 <header>$(gettext 'Connection')</header>
419 <div>
420 <form id="connection">
421 <input type="hidden" name="connect_wifi"/>
422 <input type="hidden" name="bssid" id="bssid"/>
423 <table>
424 <tr><td>$(gettext 'Network SSID')</td>
425 <td><input type="text" name="essid" value="$WIFI_ESSID" id="essid"/></td>
426 </tr>
428 <tr><td>$(gettext 'Security')</td>
429 <td><select name="keyType" id="keyType">
430 <option value="NONE">$(gettext 'None')</option>
431 <option value="WEP" >WEP</option>
432 <option value="WPA" >WPA/WPA2 PSK</option>
433 <option value="EAP" >802.1x EAP</option>
434 </select>
435 </td>
436 </tr>
438 <tr class="eap">
439 <td><div>$(gettext 'EAP method')</div></td>
440 <td><div><select name="eap" id="eap">
441 <option value="PEAP">PEAP</option>
442 <option value="TLS" >TLS</option>
443 <option value="TTLS">TTLS</option>
444 <option value="PWD" >PWD</option>
445 </select>
446 </div></td>
447 </tr>
449 <tr class="eap1">
450 <td><div>$(gettext 'Phase 2 authentication')</div></td>
451 <td><div><select name="phase2" id="phase2">
452 <option value="none" >$(gettext 'None')</option>
453 <option value="pap" >PAP</option>
454 <option value="mschap" >MSCHAP</option>
455 <option value="mschapv2">MSCHAPV2</option>
456 <option value="gtc" >GTC</option>
457 </select>
458 </div></td>
459 </tr>
461 <tr class="eap1">
462 <td><div>$(gettext 'CA certificate')</div></td>
463 <td><div><input type="text" name="caCert" id="caCert"></div></td>
464 </tr>
466 <tr class="eap1">
467 <td><div>$(gettext 'User certificate')</div></td>
468 <td><div><input type="text" name="clientCert" id="clientCert"></div></td>
469 </tr>
471 <tr class="eap">
472 <td><div>$(gettext 'Identity')</div></td>
473 <td><div><input type="text" name="identity" id="identity"></div></td>
474 </tr>
476 <tr class="eap1">
477 <td><div>$(gettext 'Anonymous identity')</div></td>
478 <td><div><input type="text" name="anonymousIdentity" id="anonymousIdentity"></div></td>
479 </tr>
481 <tr class="wep wpa eap">
482 <td><div>$(gettext 'Password')</div></td>
483 <td><div>
484 <input type="password" name="password" value="$WIFI_KEY" id="password"/>
485 <span data-img="view" title="$(gettext 'Show password')"
486 onmousedown="document.getElementById('password').type='text'; return false"
487 onmouseup="document.getElementById('password').type='password'"
488 onmouseout="document.getElementById('password').type='password'"
489 ></span>
490 </div></td>
491 </tr>
494 <!--
495 <tr><td>$(gettext 'Access point')</td>
496 <td><input type="text" name="ap" value="$WIFI_AP"/></td>
497 </tr>
498 -->
500 <script type="text/javascript">
501 function wifiSettingsChange() {
502 document.getElementById('connection').className =
503 document.getElementById('keyType').value.toLowerCase() + ' ' +
504 document.getElementById('eap').value.toLowerCase();
505 }
506 document.getElementById('keyType').onchange = wifiSettingsChange;
507 document.getElementById('eap').onchange = wifiSettingsChange;
509 document.getElementById('keyType').value = "$WIFI_KEY_TYPE"; wifiSettingsChange();
510 </script>
512 <style type="text/css">
513 #connection input[type="text"], #connection input[type="password"] { width: 14rem; }
514 #connection select { width: 14.4rem; }
516 #connection td { padding: 0; margin: 0; }
517 #connection [class] div {
518 max-height: 0; overflow: hidden; padding: 0; margin: 0;
519 -webkit-transition: all 0.5s ease-in-out;
520 -moz-transition: all 0.5s ease-in-out;
521 transition: all 0.5s ease-in-out;
522 }
523 .wep .wep div, .wpa .wpa div, .eap .eap div,
524 .eap.peap .eap1 div, .eap.tls .eap1 div, .eap.ttls .eap1 div {
525 max-height: 2em !important;
526 }
527 </style>
529 </table>
530 </form>
531 </div>
532 <footer>
533 <button form="connection" type="submit" name="wifi" data-icon="ok">$(gettext 'Configure')</button>
534 </footer>
535 </section>
536 EOT
537 fi
539 cat <<EOT
540 <section>
541 <header>
542 $(gettext 'Configuration file')
543 <form action="index.cgi">
544 <input type="hidden" name="file" value="/etc/network.conf"/>
545 <button name="action" value="edit" data-icon="edit">$(gettext 'Edit')</button>
546 </form>
547 </header>
548 <div>$(gettext "These values are the wifi settings in the main /etc/network.conf configuration file")</div>
549 <pre>$(grep ^WIFI /etc/network.conf | sed '/WIFI_KEY=/s|".*"|"********"|' | syntax_highlighter conf)</pre>
550 </section>
553 <section>
554 <header>$(gettext 'Output of iwconfig')</header>
555 <pre>$(iwconfig)</pre>
556 </section>
557 EOT
558 ;;
561 *)
562 # Main Network page starting with a summary
563 xhtml_header
565 stop_disabled=''; start_disabled=''
566 if cat /sys/class/net/*/operstate | fgrep -q up; then
567 start_disabled='disabled'
568 else
569 stop_disabled='disabled'
570 fi
572 cat <<EOT
573 <h2>$(gettext 'Networking')</h2>
575 <p>$(gettext 'Manage network connections and services')</p>
577 <form action="index.cgi" id="indexform"></form>
579 <form id="mainform"><!--
580 --><button name="start" data-icon="start" $start_disabled>$(gettext 'Start' )</button><!--
581 --><button name="stop" data-icon="stop" $stop_disabled >$(gettext 'Stop' )</button><!--
582 --><button name="restart" data-icon="restart" $stop_disabled >$(gettext 'Restart')</button>
583 </form>
584 <div class="float-right"><!--
585 -->$(gettext 'Configuration:')<!--
586 --><button form="indexform" name="file" value="/etc/network.conf" data-icon="conf">network.conf</button><!--
587 --><button form="mainform" name="eth" data-icon="eth">Ethernet</button><!--
588 --><button form="mainform" name="wifi" data-icon="wifi">Wireless</button>
589 </div>
592 <section>
593 <header>$(gettext 'Network interfaces')</header>
594 $(list_network_interfaces)
595 </section>
598 <section>
599 <header id="hosts">$(gettext 'Hosts')</header>
600 <pre>$(cat /etc/hosts)</pre>
601 <footer>
602 <form action="index.cgi">
603 <input type="hidden" name="file" value="/etc/hosts"/>
604 <button name="action" value="edit" data-icon="edit">$(gettext 'Edit')</button>
605 </form>
606 </footer>
607 </section>
610 <section>
611 <header>$(gettext 'Hostname')</header>
612 <footer>
613 <form>
614 <!-- was: name="hostname"; please don't use 'name' in name: unwanted webkit styling -->
615 <input type="text" name="host" value="$(cat /etc/hostname)"/><!--
616 --><button type="submit" data-icon="ok">$(gettext 'Change')</button>
617 </form>
618 </footer>
619 </section>
622 <section>
623 <header id="ifconfig">$(gettext 'Output of ifconfig')</header>
624 <pre>$(ifconfig)</pre>
625 </section>
628 <section>
629 <header id="routing">$(gettext 'Routing table')</header>
630 <pre>$(route -n)</pre>
631 </section>
634 <section>
635 <header id="dns">$(gettext 'Domain name resolution')</header>
636 <pre>$(cat /etc/resolv.conf)</pre>
637 </section>
640 <section>
641 <header id="arp">$(gettext 'ARP table')</header>
642 <pre>$(arp)</pre>
643 </section>
646 <section>
647 <header id="connections">$(gettext 'IP Connections')</header>
648 <pre>$(netstat -anp 2>/dev/null | sed -e '/UNIX domain sockets/,$d' \
649 -e 's#\([0-9]*\)/#<a href="boot.cgi?daemons=pid=\1">\1</a>/#')</pre>
650 </section>
651 EOT
652 ;;
653 esac
655 xhtml_footer
656 exit 0