fsck.cgi

来自「Unix下基于Web的管理工具」· CGI 代码 · 共 23 行

CGI
23 行
字号
#!/usr/local/bin/perl# fsck.cgi# Do the actual checking of a filesystemrequire './format-lib.pl';&ReadParse();&can_edit_disk($in{'dev'}) || &error("You are not allowed to fsck this disk");&header("Check Filesystem", "");print "<hr>\n";$in{dev} =~ s/dsk/rdsk/g;$cmd = "fsck -F ufs $in{mode} $in{dev}";print "Executing command <tt>$cmd</tt> ...<p>\n";print "<pre>\n";open(FSCK, "$cmd 2>&1 </dev/null |");while(<FSCK>) { print; }close(FSCK);print "</pre>\n";print "... ",&fsck_error($?/256),"<p>\n";print "<hr>\n";&footer("", "disk list");

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?