Avoid 'echo' failure during 'enable'.

- in the case where the kernel doesn't know about
  /proc/sys/net/ipv6/conf/x/accept_ra

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2013-03-31 07:02:11 -07:00
parent 1db5741edd
commit 8a84c1c371

View File

@ -332,7 +332,9 @@ sub setup_interface_proc( $ ) {
}
if ( interface_has_option( $interface, 'accept_ra' , $value ) ) {
push @emitted, "echo $value > /proc/sys/net/ipv6/conf/$physical/accept_ra";
push @emitted, "if [ -f /proc/sys/net/ipv6/conf/$physical/accept_ra ]; then";
push @emitted, " echo $value > /proc/sys/net/ipv6/conf/$physical/accept_ra";
push @emitted, 'fi';
}
if ( @emitted ) {