According to the manual page for rc.conf(5), an empty "jail_list" variable should result in all jails being started on boot or with "service jail start": jail_list (str) A space-delimited list of jail names. When left empty, all of the jail(8) instances defined in the configuration file are started. The names specified in this list control the jail startup order. jail(8) instances missing from jail_list must be started manually. Note that a jail's depend parameter in the configuration file may override this list. In FreeBSD 13.2-RELEASE, "service jail start" with an empty jail_list results in the following error message with an exit status of 0: "/etc/jail.conf: No such file or directory" The following shell output demonstrates this issue: ``` # uname -a FreeBSD freebsd-sketch 13.2-RELEASE-p3 FreeBSD 13.2-RELEASE-p3 GENERIC amd64 # file /etc/jail.conf.d/foo.conf /etc/jail.conf.d/foo.conf: ASCII text # grep '^jail_list' /etc/rc.conf jail_list="" root@freebsd-sketch:~ # service jail start Starting jails:jail: /etc/jail.conf: No such file or directory . # echo $? 0 # jls JID IP Address Hostname Path # # Edit rc.conf to manually specify the "foo" jail. # grep '^jail_list' /etc/rc.conf jail_list="foo" # service jail start Starting jails: foo. # jls JID IP Address Hostname Path 3 foo. /zroot/jails/foo ```
It would be nice if it did, but an empty $jail_list just starts the jails in the global /etc/jail.conf. To have per jail jail.conf files in FreeBSD < 14 you need to list them in $jail_list. The least painful way to do this is through `sysrc jail_list+=$name`.
Is this just a documentation bug in 13.2? What changed between 13.2 and 14.0 such that this stopped being a problem?
Greetings, In FreeBSD 13.2-RELEASE, jail_list="" will start the jails that are defined in jail.conf. If you want to start the jails in jails.conf.d, you have to use jail_list. In FreeBSD 14, the behavior seems to be the same (at least according to the code). However, you can do the following in jail.conf .include("/etc/jail.conf.d/foo.conf") which is better than using jail_list, as it will give you the ability to use features such as depends, multi-layer includes, etc. This, indeed, seems like a bug in documentation. I will fix it.