mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Use php function to get hostname instead of exec()
This commit is contained in:
parent
4744c6e44e
commit
645018b2ef
@ -57,11 +57,10 @@ function getNasID()
|
||||
{
|
||||
global $g;
|
||||
|
||||
$nasId = "";
|
||||
exec("/bin/hostname", $nasId);
|
||||
if(!$nasId[0])
|
||||
$nasId[0] = "{$g['product_name']}";
|
||||
return $nasId[0];
|
||||
$nasId = gethostname();
|
||||
if(empty($nasId))
|
||||
$nasId = $g['product_name'];
|
||||
return $nasId;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user