1、编辑productinfo.xml:
vim /usr/share/openmediavault/productinfo.xml
如何路径不是/usr/share/openmediavault,通过find命令查找:find / -name productinfo.xml
修改xml文件内容,将<name>openmediavault</name>中的内容改为OVM私有网盘即可,记得保存:
<?xml version="1.0" encoding="UTF-8"?>
<productinfo>
<name>OMV私有网盘</name>
<versionname>Usul</versionname>
<url>https://www.openmediavault.org</url>
<copyright>Copyright (C) 2009-2021 by Volker Theile. All rights reserved.</copyright>
<packagename>openmediavault</packagename>
<distribution>usul</distribution>
</productinfo>
按照步骤修改完成后,浏览器标题显示为“OMV私有网盘 control panel”,如果需要修改control panel为中文字符,请参考步骤2
2、修改 /usr/share/php/openmediavault/controlpanel/controlpanelabstract.inc
找到getTitle方法,找到$title变量,修改后面的值即可
protected function getTitle() {
try {
$prd = new \OMV\ProductInfo();
$map = [
"{{fqdn}}" => \OMV\System\Net\Dns::getFqdn(),
"{{prdname}}" => $prd->getName()
];
$title = \OMV\Environment::get("OMV_WEBGUI_TITLE",
"{{prdname}} 控制台 - {{fqdn}}");
foreach ($map as $mapk => $mapv) {
$title = str_replace($mapk, $mapv, $title);
}
} catch(\Exception $e) {
// Nothing to do here.
}
return $title;
}
3、还可以修改globals.inc,新增一行代码:
\OMV\Environment::set("OMV_WEBGUI_TITLE", "OMV私有网盘 控制台 ");