devfs
[Top] [All Lists]

Re: Newbie questions: Auto creating devices ?

To: Piete Brooks <Piete.Brooks@xxxxxxxxxxxx>
Subject: Re: Newbie questions: Auto creating devices ?
From: Richard Gooch <rgooch@xxxxxxxxxxxxxxx>
Date: Thu, 29 Mar 2001 13:29:14 -0700
Cc: devfs@xxxxxxxxxxx
In-reply-to: <E14cxJI-0000dM-00@xxxxxxxxxxxxxxxxxxxxxxx>
References: <E14cxJI-0000dM-00@xxxxxxxxxxxxxxxxxxxxxxx>
Sender: owner-devfs@xxxxxxxxxxx
Piete Brooks writes:
> I've not received any replies to my earlier email :-(

Speaking for myself, my life has been a mess (travel, moving house,
sick with 'flu), so I haven't been able to reply. I don't recall an
answer to this, so here I go:

> I've got further problems trying to access a SCSI tape changer.
> I need to modprobe st and sg to make the devices appear.  This is
> fine for a while, but the user reports that the devices `disappear'.
> I assume others must have this working properly -- can they send me
> details of how to configure it ?  Ta.

My guess is that you have a cron job which is regularly unloading
autoloaded modules.

> It mostly works, but there are a few remaining problems.
> I've read http://www.atnf.csiro.au/~rgooch/linux/docs/devfs.html and
> am none the wiser. I'm not sure what `man devfsd' means by "old
> compatibility entries" and "new compatibility entries".  Are there
> other docs out there ? Are there any sample config files I can look
> at ?

Old compatibility names are /dev/hda, /dev/sda, /dev/rtc and so on.
These are the legacy names. I've added some text to my master copy of
the FAQ to explain this.

New compatibility entries are (as the FAQ explains) convenience or
shorthand entries. The raw kernel-supplied names are a bit verbose, so
a shorthand variation is provided for those who don't like typing
(like me).

> I was assuming that there would be something I could put in
> devfsd.conf to say `create a link from /dev/mouse to ttys/0' (I know
> some people don't like /dev/mouse, but we use it!), rather than
> having use the tarball approach. Can this be done ?

No. Devfsd is event/action based. There isn't a "startup" event, and I
don't see much point. You could just as well write a script.

What I plan on doing at some point is to leverage the COPY action so
that manually created device nodes which have been saved in the
database (i.e. /dev-state/) will be copied into devfs. Thus, the
following sequence would be supported:

# ln -s tts/0 /dev/mouse
(devfs sends CREATE event to devfsd)
(devfsd copies node to /dev-state)
# reboot
(devfsd reads /dev-state and copies back to devfs)

> The latest problem is that in the old world, when a user tried to
> open /dev/audio, kmod loaded the driver and it all worked.  Now
> there is no /dev/audio to trigger kmod, and just attempting to open
> the name /dev/audio doesn't work.  Manually doing a modprobe works
> and causes /dev/audio to appear, but with the wrong modes --
> likewise /dev/cdroms/ is
> drw------- and even the `owner' can't access /dev/cdrom
> How should it all work ?

You need to configure /dev/sound to load the appropriate sound
driver. See the modules.devfs file provided with devfsd.

                                Regards,

                                        Richard....
Permanent: rgooch@xxxxxxxxxxxxx
Current:   rgooch@xxxxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>