Handle hostnames with upper-case letters
[webmin.git] / format / newfs_form.cgi
1 #!/usr/local/bin/perl
2 # newfs_form.cgi
3 # Display a form asking for new filesystem details
4
5 require './format-lib.pl';
6 $access{'view'} && &error($text{'ecannot'});
7 &ReadParse();
8 &can_edit_disk($in{'dev'}) || &error("You are not allowed to format this disk");
9 &ui_print_header(undef, "Create Filesystem", "");
10
11 print "<form action=newfs.cgi>\n";
12 print "<input type=hidden name=dev value=\"$in{dev}\">\n";
13 print &text('newfs_desc', "<b>".&fstype_name("ufs")."</b>",
14                           "<b><tt>$in{dev}</tt></b>"),"<p>\n";
15
16 if ((@stat = &device_status($in{dev})) && $stat[1] ne "swap") {
17         print &text('newfs_warn', "<tt>$stat[0]</tt>"),"<p>\n";
18         }
19
20 print "<table border width=100%>\n";
21 print "<tr $tb> <td><b>$text{'newfs_header'}</b></td> </tr>\n";
22 print "<tr $cb> <td><table width=100%>\n";
23 &opt_input("ufs_a", "", 1);
24 &opt_input("ufs_b", "bytes", 0);
25 &opt_input("ufs_c", "", 1);
26 &opt_input("ufs_d", "ms", 0);
27 &opt_input("ufs_f", "bytes", 1);
28 &opt_input("ufs_i", "bytes", 0);
29 &opt_input("ufs_m", "%", 1);
30 &opt_input("ufs_n", "", 0);
31 print "<tr> <td align=right><b>$text{'ufs_o'}</b></td>\n";
32 print "<td><select name=ufs_o>\n";
33 print "<option value=''> $text{'default'}\n";
34 print "<option value=space> $text{'newfs_space'}\n";
35 print "<option value=time> $text{'newfs_time'}\n";
36 print "</select></td>\n";
37 &opt_input("ufs_r", "rpm", 0);
38 &opt_input("ufs_s", "sectors", 1);
39 &opt_input("ufs_t", "", 0);
40 &opt_input("ufs_cb", "", 1);
41 print "</table></td></tr></table><br>\n";
42
43 print "<div align=right>\n";
44 print "<input type=submit value=\"$text{'newfs_create'}\"></form>\n";
45 print "</div>\n";
46
47 &ui_print_footer("", $text{'index_return'});
48