| Server IP : 127.0.0.1 / Your IP : 216.73.216.109 Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10 System : Windows NT DESKTOP-E5T4RUN 10.0 build 19045 (Windows 10) AMD64 User : SERVERWEB ( 0) PHP Version : 8.1.10 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/cygwin64/home/SERVERWEB/webmin-2.105/raid/ |
Upload File : |
#!/usr/bin/perl
# mkfs.cgi
# Create a new linux filesystem
require './raid-lib.pl';
&foreign_require("proc");
&ReadParse();
&error_setup($text{'mkfs_err'});
$conf = &get_raidtab();
$raid = $conf->[$in{'idx'}];
$cmd = &fdisk::mkfs_parse($in{'fs'}, $raid->{'value'});
$lvl = &find_value('raid-level', $raid->{'members'});
$chunk = &find_value('chunk-size', $raid->{'members'});
if ($lvl >= 4 && $in{'fs'} =~ /^ext\d+$/) {
$bs = $in{'ext2_b_def'} ? 4096 : $in{'ext2_b'};
}
&ui_print_unbuffered_header(undef, $text{'mkfs_title'}, "");
print &text('mkfs_exec', "<tt>$cmd</tt>"),"<p>\n";
print "<pre>\n";
&proc::safe_process_exec_logged($cmd, 0, 0, STDOUT, undef, 1);
print "</pre>\n";
if ($?) { print "<b>$text{'mkfs_failed'}</b> <p>\n"; }
else { print "$text{'mkfs_ok'} <p>\n"; }
$config{'lasttype_'.$raid->{'value'}} = $in{'fs'};
&save_module_config();
&webmin_log("mkfs", undef, $raid->{'value'}, \%in);
&ui_print_footer("", $text{'index_return'});