general-functions.pl: Add function to get the used interface on red.

This commit is contained in:
Stefan Schantl
2014-06-03 22:33:18 +02:00
committed by Michael Tremer
parent dc74d0fd94
commit 4cb523d462

View File

@@ -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;