diff options
author | cjc <cjc@FreeBSD.org> | 2002-02-20 10:31:01 +0000 |
---|---|---|
committer | cjc <cjc@FreeBSD.org> | 2002-02-20 10:31:01 +0000 |
commit | 5eebfcea9b91d92ee8dfb13175e8df4db32ba2bf (patch) | |
tree | b19652aa3fabe6cc71da57b47a1feb4dc4ac7582 /etc/rc.d/routing | |
parent | f41a9d6db54165b50cd0f2f6245a40b6843e8a5f (diff) | |
download | FreeBSD-src-5eebfcea9b91d92ee8dfb13175e8df4db32ba2bf.zip FreeBSD-src-5eebfcea9b91d92ee8dfb13175e8df4db32ba2bf.tar.gz |
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
Diffstat (limited to 'etc/rc.d/routing')
-rw-r--r-- | etc/rc.d/routing | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/etc/rc.d/routing b/etc/rc.d/routing index a3ec576..303cd1f 100644 --- a/etc/rc.d/routing +++ b/etc/rc.d/routing @@ -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 |