3 # Display options that apply to all sections
5 require './lilo-lib.pl';
6 &foreign_require("fdisk", "fdisk-lib.pl");
8 &ui_print_header(undef, $text{'global_title'}, "");
9 $conf = &get_lilo_conf();
11 print "<form action=save_global.cgi>\n";
12 print "<table border width=100%>\n";
13 print "<tr $tb> <td><b>$text{'global_desc'}</b></td> </tr>\n";
14 print "<tr $cb> <td><table width=100%>\n";
16 $boot = &find_value("boot", $conf);
17 print "<tr> <td><b>$text{'global_boot'}</b></td> <td colspan=3>\n";
18 printf "<input type=radio name=bootmode value=0 %s> $text{'global_root'}\n",
19 $boot ? "" : "checked";
20 printf "<input type=radio name=bootmode value=1 %s>\n",
21 $boot ? "checked" : "";
22 print &foreign_call("fdisk", "partition_select", "boot", $boot, 2);
23 print "</td> </tr>\n";
25 $default = &find_value("default", $conf);
26 print "<tr> <td><b>$text{'global_default'}</b></td> <td colspan=3>\n";
27 printf "<input type=radio name=defaultmode value=0 %s> $text{'global_first'}\n",
28 $default ? "" : "checked";
29 printf "<input type=radio name=defaultmode value=1 %s>\n",
30 $default ? "checked" : "";
31 print "<select name=default>\n";
32 @images = sort { $a->{'index'} <=> $b->{'index'} }
33 ( &find("image", $conf), &find("other", $conf) );
34 foreach $i (@images) {
35 $l = &find_value("label", $i->{'members'});
37 printf "<option %s>$l\n",
38 $default eq $l ? "selected" : "";
41 print "</select></td> </tr>\n";
43 $prompt = &find("prompt", $conf);
44 print "<tr> <td><b>$text{'global_prompt'}</b></td> <td>\n";
45 printf "<input type=radio name=prompt value=1 %s> $text{'yes'}\n",
46 $prompt ? "checked" : "";
47 printf "<input type=radio name=prompt value=0 %s> $text{'no'}</td>\n",
48 $prompt ? "" : "checked";
50 $timeout = &find_value("timeout", $conf);
51 print "<td><b>$text{'global_timeout'}</b></td> <td>\n";
52 printf "<input type=radio name=timeout_def value=1 %s> %s\n",
53 $timeout ? "" : "checked", $text{'global_forever'};
54 printf "<input type=radio name=timeout_def value=0 %s>\n",
55 $timeout ? "checked" : "";
56 printf "<input name=timeout size=5 value='%s'> $text{'global_secs'}</td> </tr>\n",
57 $timeout ? $timeout / 10.0 : "";
59 $lock = &find("lock", $conf);
60 print "<tr> <td><b>$text{'global_lock'}</b></td> <td>\n";
61 printf "<input type=radio name=lock value=1 %s> $text{'yes'}\n",
62 $lock ? "checked" : "";
63 printf "<input type=radio name=lock value=0 %s> $text{'no'}</td>\n",
64 $lock ? "" : "checked";
66 $delay = &find_value("delay", $conf);
67 print "<td><b>$text{'global_delay'}</b></td> <td>\n";
68 printf "<input type=radio name=delay_def value=1 %s> $text{'global_imm'}\n",
69 $delay ? "" : "checked";
70 printf "<input type=radio name=delay_def value=0 %s>\n",
71 $delay ? "checked" : "";
72 printf "<input name=delay size=5 value='%s'> $text{'global_secs'}</td> </tr>\n",
73 $delay ? $delay / 10.0 : "";
75 $compact = &find("compact", $conf);
76 print "<tr> <td><b>$text{'global_compact'}</b></td> <td>\n";
77 printf "<input type=radio name=compact value=1 %s> $text{'yes'}\n",
78 $compact ? "checked" : "";
79 printf "<input type=radio name=compact value=0 %s> $text{'no'}</td>\n",
80 $compact ? "" : "checked";
82 $optional = &find("optional", $conf);
83 print "<td><b>$text{'global_optional'}</b></td> <td>\n";
84 printf "<input type=radio name=optional value=1 %s> $text{'yes'}\n",
85 $optional ? "checked" : "";
86 printf "<input type=radio name=optional value=0 %s> $text{'no'}</td> </tr>\n",
87 $optional ? "" : "checked";
89 $password = &find_value("password", $conf);
90 print "<tr> <td><b>$text{'global_password'}</b></td> <td colspan=3>\n";
91 printf "<input type=radio name=passmode value=0 %s> $text{'global_none'}\n",
92 $password ? "" : "checked";
93 printf "<input type=radio name=passmode value=1 %s>\n",
94 $password ? "checked" : "";
95 print "<input name=password size=25 value=\"$password\"></td> </tr>\n";
97 $restricted = &find("restricted", $conf);
98 printf "<tr> <td><b>$text{'global_restricted'}</b></td> <td colspan=3>\n";
99 printf "<input type=radio name=restricted value=1 %s> %s\n",
100 $restricted ? "checked" : "", $text{'global_extra'};
101 printf "<input type=radio name=restricted value=0 %s> %s</td> </tr>\n",
102 $restricted ? "" : "checked", $text{'global_any'};
104 if ($lilo_version >= 21.3) {
105 $lba = &find("lba32", $conf);
106 print "<tr> <td><b>$text{'global_lba'}</b></td> <td>\n";
107 printf "<input type=radio name=lba value=1 %s> $text{'yes'}\n",
108 $lba ? "checked" : "";
109 printf "<input type=radio name=lba value=0 %s> $text{'no'}</td></tr>\n",
110 $lba ? "" : "checked";
113 print "</table></td></tr></table><br>\n";
114 print "<input type=submit value=\"$text{'save'}\"></form>\n";
116 &ui_print_footer("", $text{'index_return'});