Date: Thu, 08 Jan 2004 13:40:59 -0800 From: Sean McNeil <sean@mcneil.com> To: freebsd-current@freebsd.org Subject: devfs support of wildcarding Message-ID: <1073598059.1541.3.camel@server.mcneil.com>
next in thread | raw e-mail | index | archive | help
My recent post with a change to /etc/rc.d/devfs allowed for things like: perm pass* 0666 to be in /etc/devfs.conf I've made a slight modification to that to allow something like: perm xpt0,pass*,cd* 0666 I hope someone else might find this useful. /etc/rc.d/devfs: #!/bin/sh # # $FreeBSD: src/etc/rc.d/devfs,v 1.6 2003/08/20 06:15:18 mtm Exp $ # # PROVIDE: devfs # REQUIRE: LOGIN # BEFORE: securelevel # KEYWORD: FreeBSD . /etc/rc.subr name="devfs" start_cmd='devfs_start' stop_cmd=':' devfs_start() { if [ -n "$devfs_system_ruleset" ]; then devfs_init_rulesets devfs_set_ruleset $devfs_system_ruleset /dev devfs_apply_ruleset $devfs_system_ruleset /dev fi read_devfs_conf } read_devfs_conf() { if [ -r /etc/devfs.conf ]; then cd /dev while read action devlist parameter; do for device in `echo ${devlist} | sed -e 's/,/ /g'`; do case "${action}" in l*) if [ -c ${device} -a ! -e ${parameter} ]; then ln -fs ${device} ${parameter} fi ;; o*) if [ -c ${device} ]; then chown ${parameter} ${device} fi ;; p*) if [ -c ${device} ]; then chmod ${parameter} ${device} fi ;; esac done done < /etc/devfs.conf fi } load_rc_config $name run_rc_command "$1"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1073598059.1541.3.camel>