HEX
Server: Apache/2.2.15 (CentOS)
System: Linux ip-10-0-2-146.eu-west-1.compute.internal 2.6.32-754.35.1.el6.centos.plus.x86_64 #1 SMP Sat Nov 7 11:33:42 UTC 2020 x86_64
User: root (0)
PHP: 5.6.40
Disabled: NONE
Upload Files
File: //usr/libexec/webmin/fdisk/tunefs.cgi
#!/usr/bin/perl
# tunefs.cgi
# Do the tuning of a filesystem

require './fdisk-lib.pl';
&ReadParse();
&can_edit_disk($in{'dev'}) || &error($text{'tunefs_ecannot'});
&error_setup($text{'tunefs_err'});
$cmd = &tunefs_parse($in{type}, $in{dev});
&ui_print_unbuffered_header(undef, $text{'tunefs_title'}, "");

print "<b>",&text('tunefs_exec', "<tt>$cmd</tt>"),"</b>\n";
print "<pre>\n";
&foreign_call("proc", "safe_process_exec_logged",
	      $cmd, 0, 0, STDOUT, undef, 1);
print "</pre>\n";
if ($?) { print "<b>$text{'tunefs_failed'}</b><p>\n"; }
else { print "<b>$text{'tunefs_ok'}</b><p>\n"; }
&webmin_log("tunefs", undef, $in{'dev'}, \%in);

&ui_print_footer("", $text{'index_return'});