tazpanel view boot.cgi @ rev 50

Add boot.cgi (also latest commit have entry to change panel passwd
author Christophe Lincoln <pankso@slitaz.org>
date Sat Apr 09 00:23:41 2011 +0200 (2011-04-09)
parents
children a7f0d1a1ed2e
line source
1 #!/bin/sh
2 #
3 # Boot CGI script - All what appens before login (grub, rcS, slim)
4 #
5 # Copyright (C) 2011 SliTaz GNU/Linux - GNU gpl v3
6 #
7 echo "Content-Type: text/html"
8 echo ""
10 # Common functions from libtazpanel and source main boot config file.
11 . lib/libtazpanel
12 . /etc/rcS.conf
13 get_config
15 # Include gettext helper script.
16 . /usr/bin/gettext.sh
18 # Export package name for gettext.
19 TEXTDOMAIN='tazpanel'
20 export TEXTDOMAIN
22 TITLE="- Hardware"
24 #
25 # Commands
26 #
28 case "$QUERY_STRING" in
29 *)
30 #
31 # Everything until user login
32 #
33 . /etc/rcS.conf
34 TITLE="- Boot"
35 xhtml_header
36 debug_info
37 cat << EOT
38 <div id="wrapper">
39 <h2>`gettext "Boot &amp; startup"`</h2>
40 <p>
41 `gettext "Everything that appends before user login."`
42 </p>
43 </div>
45 <h3>`gettext "Kernel cmdline"`</h3>
46 <pre>
47 `cat /proc/cmdline`
48 </pre>
49 EOT
50 # Demon list
51 table_start
52 cat << EOT
53 <thead>
54 <tr>
55 <td>`gettext "Name"`</td>
56 <td>`gettext "Dessciption"`</td>
57 <td>`gettext "Status"`</td>
58 </tr>
59 </thead>
60 EOT
61 for d in `echo $RUN_DAEMONS`
62 do
63 echo '<tr>'
64 echo "<td>$d</td>"
65 if [ -d "$LOCALSTATE/installed/$d" ]; then
66 . $LOCALSTATE/installed/$d/receipt
67 echo "<td>$SHORT_DESC</td>"
68 else
69 # Standard SliTaz deamons
70 case "$d" in
71 firewall)
72 gettext "<td>SliTaz Firewall with iptable rules</td>" ;;
73 hald)
74 . $LOCALSTATE/installed/hal/receipt
75 echo "<td>$SHORT_DESC</td>" ;;
76 *)
77 echo "<td>N/A</td>" ;;
78 esac
79 fi
80 # Running or not
81 if pidof $d; then
82 echo "<td>`gettext \"Running\"` (`pidof $d`)</td>"
83 else
84 gettext "<td>Stopper</td>"
85 fi
86 echo '</tr>'
87 done
90 table_end
91 cat << EOT
92 <h3>`gettext "Local startup commands"`</h3>
93 <pre>
94 `cat /etc/init.d/local.sh`
95 </pre>
96 EOT
97 ;;
98 esac
100 xhtml_footer
101 exit 0