# HG changeset patch # User Christophe Lincoln # Date 1303087494 -7200 # Node ID e4381f2e73f66ef08c35b920862679a1bcc7479e # Parent 3e240532b3dbfaebbe3a60427c862493aae35ad5 boot.cgi: Add grub page configuration diff -r 3e240532b3db -r e4381f2e73f6 boot.cgi --- a/boot.cgi Mon Apr 18 01:00:41 2011 +0200 +++ b/boot.cgi Mon Apr 18 02:44:54 2011 +0200 @@ -171,33 +171,84 @@ echo '' done table_end ;; + *\ grub\ *) + if [ "$(GET splash)" ]; then + default=$(GET default) + timeout=$(GET timeout) + splash=$(GET splash) + sed -i \ + -e s"/default .*/default $default/" \ + -e s"/timeout .*/timeout $timeout/" \ + -e s"#splashimage=.*#splashimage=$splash#" \ + /boot/grub/menu.lst + fi + default=$(cat /boot/grub/menu.lst | grep ^default | cut -d " " -f 2) + timeout=$(cat /boot/grub/menu.lst | grep ^timeout | cut -d " " -f 2) + splash=$(cat /boot/grub/menu.lst | grep ^splashimage | cut -d "=" -f 2) + xhtml_header + cat << EOT +
+

$(gettext "GRUB Boot loader")

+

+ $(gettext "The first application stated when computer got power on") +

+
+ +
+ +
+Default entry : 
+
+Timeout       : 
+
+Splash image  : 
+
+ + + View or edit menu.lst +
+ +

$(gettext "Boot entries")

+EOT + entry='-1' + grep ^title /boot/grub/menu.lst | while read title + do + entry=$(($entry + 1)) + echo "$(gettext "Entry") $entry" + echo '
'
+		grep -A 2 "$title" /boot/grub/menu.lst
+		echo '
' + done + # Here we could check if an entry for gpxe is present if not + # display a form to add it. + [ -f "/boot/gpxe" ] && echo "

gPXE

" && \ + gettext "Web boot is avalaible with gPXE" + ;; *) # # Default content with summary # . /etc/rcS.conf xhtml_header - cat << EOT
-

`gettext "Boot & Start services"`

+

$(gettext "Boot & Start services")

- `gettext "Everything that happens before user login"` + $(gettext "Everything that happens before user login")

- `gettext "Boot logs"` + $(gettext "Boot logs") - `gettext "Manage daemons"` + $(gettext "Manage daemons") + $(gettext "Boot loader")

`gettext "Configuration files"`

diff -r 3e240532b3db -r e4381f2e73f6 data/tazpanel.conf --- a/data/tazpanel.conf Mon Apr 18 01:00:41 2011 +0200 +++ b/data/tazpanel.conf Mon Apr 18 02:44:54 2011 +0200 @@ -13,7 +13,7 @@ FOOTER="/styles/$STYLE/footer.html" # Display some debug messages -DEBUG="0" +DEBUG="1" # Activity log file LOG_FILE="/var/log/slitaz/tazpanel.log" diff -r 3e240532b3db -r e4381f2e73f6 lib/libtazpanel --- a/lib/libtazpanel Mon Apr 18 01:00:41 2011 +0200 +++ b/lib/libtazpanel Mon Apr 18 02:44:54 2011 +0200 @@ -45,7 +45,9 @@ # Remove status and ESC char from tazpkg/tazlito commands output filter_taztools_msgs() { - grep ^[a-zA-Z0-9] | sed s'/\[^Gm]*.//g' + grep ^[a-zA-Z0-9] | sed \ + -e s'/\[^Gm]*.//g' \ + -e s'@OK@OK@' } # LOG activities