📄 conf_misc.cgi
字号:
#!/usr/local/bin/perl# conf_misc.cgi# Display other optionsrequire './samba-lib.pl';&header("Miscellaneous Options", "");print "<hr>\n";&get_share("global");print "<form action=save_misc.cgi>\n";print "<table border width=100%>\n";print "<tr $tb> <td><b>Miscellaneous Options</b></td> </tr>\n";print "<tr $cb> <td><table width=100%>\n";print "<tr> <td><b>Debug Level</b></td>\n";print "<td><select name=debug_level>\n";foreach $d ("", 0 .. 10) { printf "<option value=\"$d\" %s> %s\n", &getval("debug level") eq $d ? "selected" : "", $d eq "" ? "Default" : $d; }print "</select></td>\n";print "<td><b>Cache <tt>getwd()</tt> calls?</b></td>\n";printf "<td nowrap><input type=radio name=getwd_cache value=yes %s> Yes\n", &istrue("getwd cache") ? "checked" : "";printf "<input type=radio name=getwd_cache value=no %s> No</td> </tr>\n", &istrue("getwd cache") ? "" : "checked";print "<tr> <td><b>Lock directory</b></td>\n";print "<td colspan=3>\n";printf "<input type=radio name=lock_directory_def value=1 %s> Default\n", &getval("lock directory") eq "" ? "checked" : "";printf " <input type=radio name=lock_directory_def value=0 %s>\n", &getval("lock directory") eq "" ? "" : "checked";printf "<input name=lock_directory size=30 value=\"%s\">\n", &getval("lock directory");print &file_chooser_button("lock_directory", 1);print "</td> </tr>\n";print "<tr> <td><b>Log file</b></td>\n";print "<td colspan=3>\n";printf "<input type=radio name=log_file_def value=1 %s> Default\n", &getval("log file") eq "" ? "checked" : "";printf " <input type=radio name=log_file_def value=0 %s>\n", &getval("log file") eq "" ? "" : "checked";printf "<input name=log_file size=30 value=\"%s\">\n", &getval("log file");print &file_chooser_button("log_file", 0);print "</td> </tr>\n";print "<tr> <td><b>Max log size</b></td>\n";printf "<td nowrap><input type=radio name=max_log_size_def value=1 %s> Default\n", &getval("max log size") eq "" ? "checked" : "";printf "<input type=radio name=max_log_size_def value=0 %s>\n", &getval("max log size") eq "" ? "" : "checked";printf "<input name=max_log_size size=5 value=\"%s\">Kb</td>\n", &getval("max log size");print "<tr> <td><b>Allow raw reads?</b></td>\n";printf "<td nowrap><input type=radio name=read_raw value=yes %s> Yes\n", &isfalse("read raw") ? "" : "checked";printf "<input type=radio name=read_raw value=no %s> No</td>\n", &isfalse("read raw") ? "checked" : "";print "<td><b>Allow raw writes?</b></td>\n";printf "<td nowrap><input type=radio name=write_raw value=yes %s> Yes\n", &isfalse("write raw") ? "" : "checked";printf "<input type=radio name=write_raw value=no %s> No</td> </tr>\n", &isfalse("write raw") ? "checked" : "";print "<td><b>Overlapping read size</b></td>\n";printf "<td nowrap><input type=radio name=read_size_def value=1 %s> Default\n", &getval("read size") eq "" ? "checked" : "";printf "<input type=radio name=read_size_def value=0 %s>\n", &getval("read size") eq "" ? "" : "checked";printf "<input name=read_size size=5 value=\"%s\">bytes</td> </tr>\n", &getval("read size");print "<tr> <td><b><tt>chroot()</tt> directory</b></td>\n";print "<td colspan=3>\n";printf "<input type=radio name=root_directory_def value=1 %s> None\n", &getval("root directory") eq "" ? "checked" : "";printf " <input type=radio name=root_directory_def value=0 %s>\n", &getval("root directory") eq "" ? "" : "checked";printf "<input name=root_directory size=30 value=\"%s\">\n", &getval("root directory");print &file_chooser_button("root_directory", 1);print "</td> </tr>\n";print "<tr> <td><b>Path to <tt>smbrun</tt></b></td>\n";print "<td colspan=3>\n";printf "<input type=radio name=smbrun_def value=1 %s> Default\n", &getval("smbrun") eq "" ? "checked" : "";printf " <input type=radio name=smbrun_def value=0 %s>\n", &getval("smbrun") eq "" ? "" : "checked";printf "<input name=smbrun size=30 value=\"%s\">\n", &getval("smbrun");print &file_chooser_button("smbrun", 0);print "</td> </tr>\n";print "<tr> <td><b>Client time offset</b></td>\n";printf "<td><input name=time_offset size=4 value=\"%d\">Mins</td>\n", &getval("time offset");print "<td><b>Read prediction?</b></td>\n";printf "<td nowrap><input type=radio name=read_prediction value=yes %s> Yes\n", &istrue("read prediction") ? "checked" : "";printf "<input type=radio name=read_prediction value=no %s> No</td> </tr>\n", &istrue("read prediction") ? "" : "checked";print "</table></tr></td></table><p>\n";print "<input type=submit value=Save></form><p>\n";print "<hr>\n";&footer("", "share list");
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -