mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-24 09:52:58 +02:00
general-functions.pl: Add function to get the used interface on red.
This commit is contained in:
committed by
Michael Tremer
parent
dc74d0fd94
commit
4cb523d462
@@ -1187,4 +1187,16 @@ sub firewall_reload() {
|
||||
system("/usr/local/bin/firewallctrl");
|
||||
}
|
||||
|
||||
# Function which will return the used interface for the red network zone (red0, ppp0, etc).
|
||||
sub get_red_interface() {
|
||||
|
||||
open(IFACE, "${General::swroot}/red/iface") or die "Could not open /var/ipfire/red/iface";
|
||||
|
||||
my $interface = <IFACE>;
|
||||
close(IFACE);
|
||||
chomp $interface;
|
||||
|
||||
return $interface;
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
Reference in New Issue
Block a user