How to set device permissions at startup

Aryeh M. Friedman aryeh.friedman at gmail.com
Fri Oct 9 18:34:06 UTC 2009


Oliver Fromme wrote:
> Roland Smith wrote:
>  > Oliver Fromme wrote:
>  > > Quote from the manpage:
>  > > "The devfs.rules file provides an easy way to create and apply
>  > > devfs(8) rules, even for devices that are not available at boot."
>  > > 
>  > > The rules take effect whenever a new node (devide) appears,
>  > > even after devfs was mounted.
>  > 
>  > But one has to run '/etc/rc.d/devfs restart' for newly added rules to take
>  > effect! (or reboot the system, which is overkill).
>
> Yes, of course.  I thought that was obvious.
>
>  > Maybe I whould add that to the manual page for devfs.rules?
>
> Agreed, that might be an appropriate clarification.
>
> Best regards
>    Oliver
>
>   
It should be included because not everyone uses the standard /etc/rc.* 
hierachy.   For example I have a completely custom rc which before I did 
an other hack to make this issue not an issue read:

#!/bin/sh

PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/boot/kernel:/boot/modules
export PATH

kldload fuse
swapon -a
fsck -p
mount -rw /
mount -a
sysctl vfs.usermount=1
ntfs-3g /dev/ad4s1 /mnt/c
/usr/local/etc/rc.d/hald onestart
hostname aryeh-desktop.istudentunion.com
ifconfig ale0 192.168.2.2
ifconfig lo0 127.0.0.1
route add 127.0.0.1 102.168.2.2
route add default 192.168.2.1
named
ntpdate pool.ntp.org
cupsd
noip2
sendmail -bd -q1m



More information about the freebsd-questions mailing list