View Single Post
  #1   (View Single Post)  
Old 30th August 2010
da1 da1 is offline
Fdisk Soldier
 
Join Date: Feb 2009
Location: Berlin, DE
Posts: 49
Default [SOLVED] - jail devfs.rules not loaded at boot

Hello fellas,

I have a 8.0-RELEASE, i386 box with 2 jails.

Here is my rc.conf:
Code:
jail_enable="YES"                                       # Set to NO to disable starting of any jails
jail_list="dns www"                                             # Space separated list of names of jails

jail_dns_rootdir="/jails/dns"                           # jail's root directory
jail_dns_hostname="dns"                                 # jail's hostname
jail_dns_ip="192.168.0.254"                             # jail's IP address
jail_dns_devfs_enable="YES"                             # mount devfs in the jail
jail_dns_devfs_ruleset="dns_ruleset"                    # devfs ruleset to apply to jail
jail_dns_exec_start="/bin/sh /etc/rc"                   # command to execute in jail for starting
jail_dns_exec_stop="/bin/sh /etc/rc.shutdown"           # command to execute in jail for stopping

jail_www_rootdir="/jails/www"                           # jail's root directory
jail_www_hostname="www"                                 # jail's hostname
jail_www_ip="192.168.0.253"                             # jail's IP address
jail_www_devfs_enable="YES"                             # mount devfs in the jail
jail_www_devfs_ruleset="www_ruleset"                    # devfs ruleset to apply to jail
jail_www_exec_start="/bin/sh /etc/rc"                   # command to execute in jail for starting
jail_www_exec_stop="/bin/sh /etc/rc.shutdown"           # command to execute in jail for stopping
/etc/devfs.rules:
Code:
[www_ruleset=1]
add hide
add path null unhide
add path zero unhide
add path random unhide
add path urandom unhide
add path crypto unhide
add path stdin unhide
add path stdout unhide
add path stderr unhide

[dns_ruleset=2]
add hide
add path null unhide
add path zero unhide
add path random unhide
add path urandom unhide
add path crypto unhide
add path stdin unhide
add path stdout unhide
add path stderr unhide
df -h:
Code:
[...]
devfs                 1.0K    1.0K      0B   100%    /jails/dns/dev
devfs                 1.0K    1.0K      0B   100%    /jails/www/dev
[...]
The problem:
At boot, the devfs.rules rules are not loaded and if I drop into the jail and do a ls in /etc, I can see everything the host machine has. However, if I manually restart the jails, the devfs rules are loaded.

I tried putting the rules in /etc/defaults/devfs.rules too (and removed them from /etc/devfs.rules) but didn't work. The behavior is the same.


Am I doing something wrong here ?

Last edited by da1; 5th September 2010 at 09:59 AM.
Reply With Quote