Change some interface options to binary

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5999 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep
2007-04-18 18:15:46 +00:00
parent ab38899b8c
commit 2ba6d592f7
3 changed files with 74 additions and 43 deletions

View File

@@ -125,10 +125,11 @@ sub setup_proxy_arp() {
}
for my $interface ( @$interfaces ) {
my $value = get_interface_option $interface, 'proxyarp';
emitj( "if [ -f /proc/sys/net/ipv4/conf/$interface/proxy_arp ] ; then" ,
" echo 1 > /proc/sys/net/ipv4/conf/$interface/proxy_arp" );
" echo $value > /proc/sys/net/ipv4/conf/$interface/proxy_arp" );
emitj( 'else' ,
" error_message \"WARNING: Unable to enable proxy ARP on $interface\"" ) unless interface_is_optional( $interface );
" error_message \"WARNING: Unable to set/reset proxy ARP on $interface\"" ) unless interface_is_optional( $interface );
emit "fi\n";
}
}