mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Only return line #1 from query
This commit is contained in:
parent
b3b2c1554d
commit
86feb886b5
@ -127,7 +127,7 @@ function convert_ip_to_network_format($ip, $subnet) {
|
||||
* find_interface_ip($interface): return the interface ip (first found)
|
||||
*/
|
||||
function find_interface_ip($interface) {
|
||||
$ip = exec_command("/sbin/ifconfig {$interface} | grep \"inet \" | cut -d\" \" -f 2");
|
||||
$ip = exec_command("/sbin/ifconfig {$interface} | grep \"inet \" | cut -n1 -d\" \" -f 2");
|
||||
return $ip;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user