From 5eebfcea9b91d92ee8dfb13175e8df4db32ba2bf Mon Sep 17 00:00:00 2001 From: cjc Date: Wed, 20 Feb 2002 10:31:01 +0000 Subject: There is no reason to demand the administrator set 'natd_interface' when running natd(8) out of the rc-files. It is perfectly valid for the interface or alias address to be set in a natd(8) configuration file, not on the command line. Also, loosen up the restrictions on identifying an IP address argument in 'natd_interface.' Fix the documentation, rc.conf(5), to reflect this change. Take the bogus default for 'natd_interface' out of /etc/defaults/rc.conf. MFC after: 3 days --- etc/rc.network | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'etc/rc.network') diff --git a/etc/rc.network b/etc/rc.network index a3ec576..303cd1f 100644 --- a/etc/rc.network +++ b/etc/rc.network @@ -344,14 +344,13 @@ network_pass1() { [Yy][Ee][Ss]) if [ -n "${natd_interface}" ]; then if echo ${natd_interface} | \ - grep -q -E '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$'; then - natd_ifarg="-a ${natd_interface}" + grep -q -E '^[0-9]+(\.[0-9]+){0,3}$'; then + natd_flags="$natd_flags -a ${natd_interface}" else - natd_ifarg="-n ${natd_interface}" + natd_flags="$natd_flags -n ${natd_interface}" fi - - echo -n ' natd'; ${natd_program:-/sbin/natd} ${natd_flags} ${natd_ifarg} fi + echo -n ' natd'; ${natd_program:-/sbin/natd} ${natd_flags} ;; esac -- cgit v1.1