diff options
author | ru <ru@FreeBSD.org> | 2008-09-24 15:18:27 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2008-09-24 15:18:27 +0000 |
commit | 821d9baa1ce9dda48595b145423f58a40529bc7d (patch) | |
tree | 14b50a82c2da0bc90cab68cf10a52d019479b9c7 /etc/rc.d/jail | |
parent | 7993f2b8351de976133f9d13d4d0ca2c74818ac8 (diff) | |
download | FreeBSD-src-821d9baa1ce9dda48595b145423f58a40529bc7d.zip FreeBSD-src-821d9baa1ce9dda48595b145423f58a40529bc7d.tar.gz |
Allow a jail's IP alias to be created with an arbitrary netmask.
MFC after: 3 days
Diffstat (limited to 'etc/rc.d/jail')
-rwxr-xr-x | etc/rc.d/jail | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/etc/rc.d/jail b/etc/rc.d/jail index 87eab69..851bf3c 100755 --- a/etc/rc.d/jail +++ b/etc/rc.d/jail @@ -39,6 +39,7 @@ init_variables() _procdir="${_rootdir}/proc" eval _hostname=\"\$jail_${_j}_hostname\" eval _ip=\"\$jail_${_j}_ip\" + eval _netmask=\"\${jail_${_j}_netmask:-255.255.255.255}\" eval _interface=\"\${jail_${_j}_interface:-${jail_interface}}\" eval _exec=\"\$jail_${_j}_exec\" eval _exec_start=\"\${jail_${_j}_exec_start:-${jail_exec_start}}\" @@ -93,6 +94,7 @@ init_variables() debug "$_j mount enable: $_mount" debug "$_j hostname: $_hostname" debug "$_j ip: $_ip" + debug "$_j netmask: $_netmask" debug "$_j interface: $_interface" debug "$_j fib: $_fib" debug "$_j root: $_rootdir" @@ -297,7 +299,7 @@ jail_start() continue; fi if [ -n "${_interface}" ]; then - ifconfig ${_interface} alias ${_ip} netmask 255.255.255.255 + ifconfig ${_interface} alias ${_ip} netmask ${_netmask} fi if [ -n "${_fib}" ]; then _setfib="setfib -F '${_fib}'" |