# Different rc.conf's



## balanga (Aug 25, 2017)

Is it possible to have different rc.conf's which could be used in different environments which could be selected from FreeBSD's initial boot menu?


----------



## O_o (Aug 25, 2017)

rcconf(5) indicates the rc_conf_files variable defaults to /etc/rc.conf and /etc/rc.conf.local.  The latter would be an appropriate place for such things.  rc_conf_files can be overridden via rc.conf thusly:


```
rc_conf_files="/etc/rc.conf /etc/rc.conf.local /etc/rc.conf.dev /etc/rc.conf.prod"
```

One may also do something similar to the following which implies the existence of additional rc.conf files:

file /etc/rc.conf

```
ENV="dev"

...

source /etc/rc.conf.${ENV}
```

I do not know how this setup could be made selectable on the boot menu.


----------

