PDA

View Full Version : Updating the PC-BSD Ports Jail network settings when the system runs dhclient


rhyous
03-21-2011, 09:50 PM
Hey all,

Here is how i fixed the fact that my Ports Jail didn't have network access after I switch from ethernet to wireless or from one wireless network to another.

Updating the PC-BSD Ports Jail network settings when the system runs dhclient (http://www.rhyous.com/2011/03/21/updating-the-pc-bsd-ports-jail-network-settings-when-the-system-runs-dhclient/)

I wonder if this is a good idea to include in version 9 by default?

kmoore134
03-22-2011, 03:08 PM
The portjail start command already copies /etc/resolv.conf ->
<jail>/etc/resolv.conf, so maybe it would work to just have the
dhclient-exit-hooks just stop/start networking for the port jail?

rhyous
03-23-2011, 01:12 AM
I started with that idea, but then I was wondering if I would be compiling a port that takes a while when I move from one wifi to another. I thought of this because sometimes I let a port compile as I drive to work and then I connect at work and let it continue compiling.

Anyway stopping and restarting the jail might not be what is really intended when you change networks. The copy is much less intrusive.