mirror of
https://github.com/unraid/webgui.git
synced 2026-01-05 17:20:04 -06:00
refactor: diagnostics: remove redundant if (!$all) checks
This commit is contained in:
@@ -478,7 +478,7 @@ foreach ($ports as $port) {
|
||||
file_put_contents("/$diag/system/ethtool.txt", "--------------------------------\r\n", FILE_APPEND);
|
||||
}
|
||||
run("ip -br a|todos >".escapeshellarg("/$diag/system/ifconfig.txt"));
|
||||
if (!$all) maskIP("/$diag/system/ifconfig.txt");
|
||||
maskIP("/$diag/system/ifconfig.txt");
|
||||
|
||||
// create system information (suppress errors)
|
||||
run("find /sys/kernel/iommu_groups/ -type l 2>/dev/null|sort -V|todos >".escapeshellarg("/$diag/system/iommu_groups.txt"));
|
||||
@@ -511,7 +511,7 @@ if (!$all) {
|
||||
// include listening interfaces
|
||||
run("$docroot/webGui/scripts/show_interfaces ip|tr ',' '\n' >".escapeshellarg("/$diag/config/listen.txt"));
|
||||
run("$docroot/webGui/scripts/error_interfaces|sed 's/<i.*i>//' >>".escapeshellarg("/$diag/config/listen.txt"));
|
||||
if (!$all) maskIP("/$diag/config/listen.txt");
|
||||
maskIP("/$diag/config/listen.txt");
|
||||
|
||||
// copy share information (anonymize if applicable)
|
||||
$files = glob("/boot/config/shares/*.cfg");
|
||||
@@ -699,7 +699,7 @@ $dhcplog = "/var/log/dhcplog";
|
||||
if (file_exists($dhcplog)) {
|
||||
$log = "/$diag/logs/dhcplog.txt";
|
||||
run("todos <$dhcplog >".escapeshellarg($log));
|
||||
if (!$all) maskIP($log);
|
||||
maskIP($log);
|
||||
}
|
||||
|
||||
// copy phplog
|
||||
|
||||
Reference in New Issue
Block a user