diff --git a/resources/switch.php b/resources/switch.php index 328488181d..7f20872259 100644 --- a/resources/switch.php +++ b/resources/switch.php @@ -1615,7 +1615,11 @@ function save_var_xml() { $xml .= "\n"; } } - $xml .= "\n"; + if (strlen($row['var_hostname']) == 0) { + $xml .= "\n"; + } elseif ($row['var_hostname'] == system('hostname')) { + $xml .= "\n"; + } } $prev_var_cat = $row['var_cat']; }