Roberto Jung Drebes writes:
> I'm using devfs-2.4.5.
<pedant>
You mean kernel 2.4.5 with CONFIG_DEVFS_FS=y
</pedant>
> I would like to have all the actions done in /dev to be persistet
> after reboots. I have some working configuration, but still have
> some doubts.
>
> I am not --binding the pre-devfs-mounted /dev to /dev-state, since this
> creates many devices which I believe one of the purposes of devfs is to
> eliminate, so I have a very minimal /dev-state with symbolic links, like
> mouse -> misc/psaux, ttyLT0 -> tts/LT0. I also have the devfsd lines
>
> REGISTER .* COPY /dev-state/$devname $devpath
> CHANGE .* COPY $devpath /dev-state/$devname
> CREATE .* COPY $devpath /dev-state/$devname
>
> which take care of keeping all modifications I do at /dev mirrored at
> /dev-state and so persisting after reboots. The problem is that since I
> would like that, whenever a device does not exists in /dev, it would first
> try to be copied from /dev-state, and if it fails, have the default LOOKUP
> action for autoloding. That is, something like:
>
> # if it is a legacy device, copy it from /dev-state
> LOOKUP .* COPY /dev-state/$devname $devpath
> # else, try autoloading vi modules.devfs
> LOOKUP .* MODLOAD
Actually, I think you want it the other way around: first try loading
the module and then copy the permissions:
LOOKUP .* MODLOAD
LOOKUP .* COPY /dev-state/$devname $devpath
If the module does exist, the COPY will update the permissions if
required. If the module doesn't exist, the COPY will create the inode.
> Right now, I am specifying each of the devices that I would like to be
> copied, like
>
> LOOKUP mouse COPY /dev-state/$devname $devpath
> LOOKUP ttyLT0 COPY /dev-state/$devname $devpath
>
> but I think the multiple LOOKUP .* solution is more elegant and
> simpler (You could boot the kernel with devfs already mounted at
> /dev, keep the old devices somewhere like /.dev-state, and have it
> all work tranparently. If you use --bind, you need to mount devfs
> later on, and that gives me errors on reboot telling me to umount
> /prov /dev-state and /dev manually). Is it possible?
Once devfsd is killed, you can unmount /dev-state. And the correct
shutdown sequence is to kill daemons and then unmount filesystems.
Regards,
Richard....
Permanent: rgooch@xxxxxxxxxxxxx
Current: rgooch@xxxxxxxxxxxxxxx
|