davidchisnall / container-vm-scripts

Scripts for building FreeBSD VMs for use with podman
47 stars 4 forks source link

rc: Configure network via rc.conf.d #3

Closed 0mp closed 1 year ago

0mp commented 1 year ago

The network configuration does not have to live in /etc/rc.conf. It can be configured via /etc/rc.conf.d. The best file for that is /etc/rc.conf.d/network, which is read by many network services such as /etc/rc.d/netif and /etc/rc.d/dhclient (search for instances of "load_rc_config network").

Configuring individual services (i.e., having separate files in rc.conf.d, such as netif and dhclient) can be done but may lead to duplicate lines.


Please note that I've not tested the very scripts in this repo yet. I just happen to know that networking can be configured this way on FreeBSD. :)

davidchisnall commented 1 year ago

Thanks! It would be great to have this in the rc.conf.d man page too.