Handle hostnames with upper-case letters
[webmin.git] / mount / create_swap.cgi
1 #!/usr/local/bin/perl
2 # create_swap.cgi
3 # Attempt to create a swap file, and then redirect the browser back to
4 # the mounting program to mount it
5
6 require './mount-lib.pl';
7 &ReadParse();
8 &error_setup($text{'swap_err'});
9 $in{cswap_size} =~ /^\d+$/ ||
10         &error(&text('swap_esize', $in{'cswap_size'}));
11 if ($error = &create_swap($in{cswap_file}, $in{cswap_size}, $in{cswap_units})) {
12         &error($error);
13         }
14 &webmin_log("swap", $in{cswap_file});
15 &redirect("save_mount.cgi?$in");
16