#!/usr/local/bin/perl
# fsck.cgi
# Where the fsck command actually gets run

require './fdisk-lib.pl';
&ReadParse();
&can_edit_disk($in{'dev'}) || &error($text{'fsck_ecannot'});
$| = 1;
$theme_no_header = 1;
&header($text{'fsck_title'}, "");
print "<hr>\n";

print &text('fsck_exec', "<tt>$cmd</tt>"),"<p>\n";
print "<pre>\n";
&foreign_call("proc", "safe_process_exec_logged",
	      $in{'cmd'}, 0, 0, STDOUT, undef, 1);
print "</pre>\n";
print "... ",&fsck_error($?/256),"<p>\n"; 
&webmin_log("fsck", undef, $in{'dev'}, \%in);

print "<hr>\n";
&footer("", $text{'index_return'});
