Index: etc/defaults/rc.conf =================================================================== RCS file: /home/ncvs/src/etc/defaults/rc.conf,v retrieving revision 1.210 diff -u -p -r1.210 rc.conf --- etc/defaults/rc.conf 30 Jun 2004 15:58:46 -0000 1.210 +++ etc/defaults/rc.conf 20 Jul 2004 12:59:37 -0000 @@ -489,6 +489,7 @@ jail_sysvipc_allow="NO" # Allow SystemV #jail_example_fdescfs_enable="NO" # mount fdescfs in the jail #jail_example_procfs_enable="NO" # mount procfs in jail #jail_example_devfs_ruleset="ruleset_name" # devfs ruleset to apply to jail +#jail_example_mount_enable="NO" # mount jail's fstab entries ############################################################## ### Define source_rc_confs, the mechanism used by /etc/rc.* ## Index: etc/rc.d/jail =================================================================== RCS file: /home/ncvs/src/etc/rc.d/jail,v retrieving revision 1.14 diff -u -p -r1.14 jail --- etc/rc.d/jail 8 Mar 2004 12:25:05 -0000 1.14 +++ etc/rc.d/jail 20 Jul 2004 12:59:37 -0000 @@ -44,12 +44,15 @@ init_variables() [ -z "${jail_fdescfs}" ] && jail_fdescfs="NO" eval jail_procfs=\"\$jail_${_j}_procfs_enable\" [ -z "${jail_procfs}" ] && jail_procfs="NO" + eval jail_mount=\"\$jail_${_j}_mount_enable\" + [ -z "${jail_mount}" ] && jail_mount="NO" # Debugging aid # debug "$_j devfs enable: $jail_devfs" debug "$_j fdescfs enable: $jail_fdescfs" debug "$_j procfs enable: $jail_procfs" + debug "$_j mount enable: $jail_mount" debug "$_j hostname: $jail_hostname" debug "$_j ip: $jail_ip" debug "$_j root: $jail_rootdir" @@ -108,6 +111,10 @@ jail_umount_fs() umount -f ${jail_procdir} >/dev/null 2>&1 fi fi + + if checkyesno jail_mount; then + umount -A -c ${jail_rootdir} >/dev/null 2>&1 + fi } jail_start() @@ -125,6 +132,10 @@ jail_start() for _jail in ${jail_list} do init_variables $_jail + if checkyesno jail_mount; then + info "Mounting jail's fstab entries" + mount -a -c ${jail_rootdir} + fi if checkyesno jail_devfs; then info "Mounting devfs on ${jail_devdir}" devfs_mount_jail "${jail_devdir}" ${jail_ruleset}