On Thu, 3 May 2001, Nick Rogness wrote:

> In 4.2-STABLE, /etc/rc.network has entries to turn on natd.
> However, natd does not get enabled if you don't specify
> natd_interface.  WHat if you you have setup stored in a
> configuration file and do not wish to supply an interface flag in
> /etc/rc.conf?  Well, natd does not turn on!

I've attached a very simple, but untested patch that will DTRT.
Anyone care to commit this if Nick says it works as expected?

Just in case the attachment doesn't make it, here it is inline (be
careful of cut'n'paste tab-to-space conversions).

--- rc.network.orig     Thu May  3 17:04:05 2001
+++ rc.network  Thu May  3 17:18:52 2001
@@ -269,7 +269,9 @@
                                                else
                                                        natd_ifarg="-n 
${natd_interface}"
                                                fi
+                                       fi

+                                       if [ -n "${natd_interface}" -o -n 
+"${natd_flags}" ]; then
                                                echo -n ' natd'; 
${natd_program:-/sbin/natd} ${natd_flags} ${natd_ifarg}
                                        fi
                                        ;;


-- Chris Dillon - [EMAIL PROTECTED] - [EMAIL PROTECTED]
   FreeBSD: The fastest and most stable server OS on the planet.
   For IA32 and Alpha architectures. IA64, PPC, and ARM under development.
   http://www.freebsd.org

--- rc.network.orig     Thu May  3 17:04:05 2001
+++ rc.network  Thu May  3 17:18:52 2001
@@ -269,7 +269,9 @@
                                                else
                                                        natd_ifarg="-n 
${natd_interface}"
                                                fi
+                                       fi
 
+                                       if [ -n "${natd_interface}" -o -n 
+"${natd_flags}" ]; then
                                                echo -n ' natd'; 
${natd_program:-/sbin/natd} ${natd_flags} ${natd_ifarg}
                                        fi
                                        ;;

Reply via email to