#!/usr/local/bin/perl # edit_global.cgi # Edit global GRUB options require './grub-lib.pl'; &foreign_require("fdisk", "fdisk-lib.pl"); $conf = &get_menu_config(); &ui_print_header(undef, $text{'global_title'}, ""); print "
\n"; print "\n"; print "\n"; print "
$text{'global_header'}
\n"; $default = &find_value("default", $conf); @titles = &find_value("title", $conf); print "\n"; print "\n"; $fallback = &find_value("fallback", $conf); print "\n"; print "\n"; $timeout = &find_value("timeout", $conf); print "\n", $timeout, $text{'global_secs'}; $password = &find("password", $conf); @pv = split(/\s+/, $password->{'value'}) if ($password); print "\n", $pv[1]; $r = $config{'install'}; $dev = &bios_to_linux($r); $sel = &foreign_call("fdisk", "partition_select", "install", $dev, 2, \$found); print "\n", $found ? '' : $r; print "
$text{'global_default'}$text{'global_fallback'}
$text{'global_timeout'} \n"; printf " %s\n", $timeout eq '' ? 'checked' : '', $text{'global_forever'}; printf "\n", $timeout eq '' ? '' : 'checked'; printf " %s
$text{'global_password'} \n"; printf " %s\n", $password eq '' ? 'checked' : '', $text{'global_none'}; printf "\n", $password eq '' ? '' : 'checked'; printf "
\n", $pv[0]; printf " %s\n", $pv[1] ? "checked" : "", $text{'global_password_file'}; printf "
$text{'global_install'} \n"; printf " %s %s\n", $found ? 'checked' : '', $text{'global_sel'}, $sel; printf " %s\n", $found ? '' : 'checked', $text{'global_other'}; printf "
\n"; print "
\n"; &ui_print_footer("", $text{'index_return'});