From 962c54b39c4a8570d6f4c348e21b7256f687ef68 Mon Sep 17 00:00:00 2001 From: green Date: Sat, 20 Mar 2004 07:10:16 +0000 Subject: [PATCH] Add a way for rc.d/devfs to set more than just the system devfs up. Yes, this means for stuff OTHER than jails, too. Example usage: #devfs_system_ruleset="root" devfs_set_rulesets="/dev=root /etc/namedb/dev=named_devfs" --- etc/rc.d/devfs | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/etc/rc.d/devfs b/etc/rc.d/devfs index a8e2f617aee0..01c288d27c0b 100644 --- a/etc/rc.d/devfs +++ b/etc/rc.d/devfs @@ -16,10 +16,23 @@ stop_cmd=':' devfs_start() { - if [ -n "$devfs_system_ruleset" ]; then + if [ -n "$devfs_system_ruleset" -o -n "$devfs_set_rulesets" ]; then devfs_init_rulesets - devfs_set_ruleset $devfs_system_ruleset /dev - devfs_apply_ruleset $devfs_system_ruleset /dev + if [ -n "$devfs_system_ruleset" ]; then + devfs_set_ruleset $devfs_system_ruleset /dev + devfs_apply_ruleset $devfs_system_ruleset /dev + fi + if [ -n "$devfs_set_rulesets" ]; then + local _dir_set + local _dir + local _set + for _dir_set in $devfs_set_rulesets; do + _dir=${_dir_set%=*} + _set=${_dir_set#*=} + devfs_set_ruleset $_set $_dir + devfs_apply_ruleset $_set $_dir + done + fi fi read_devfs_conf }