[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dexter and devfs

On Mon, Oct 16, 2000 at 02:41:00AM -0500, Derek J Witt wrote:
> I also found this to work as well:
> =======
> #!/bin/sh
> DEVFS=`grep devfs /proc/filesystems | cut -f2`
> [ $DEVFS = "devfs" ] && echo "You're using devfs. :-)"

Needs to be more complex:


# They may have more than one mounted, but always use the first
DEVFS=$(egrep ' devfs ' /proc/mounts | head -1 | cut -f2)

# No, devfsd does not have to be running for this to work. The file exists
# for devfsd's usage, and is the same test that devfsd uses to make sure
# it is operating on a devfs mount (did I say devfs enough?).
if [ "$DEVFS" != "" ] && [ -f "$DEVFS/.devfsd" ]; then
   # we have devfs mounted, use it
# ---end---

This makes sure they have it, and it is mounted. Note, if they have devfsd
actually running, then they should be able to use the old devices, but
that isn't guaranteed.

Good thing about devfs, if the device exists, that driver is installed and
working. So things like this are then possible:

[ -f "$DEVFS/misc/sunmouse" ] && ... # add sunmouse as an option
[ -f "$DEVFS/misc/psaux ] && ... # add the ps/2 options

Also, if only one option is present then you can either use it blindly, or
be nice enough to ask the user about it or an "other" entry.

Branden, let me take this time to point out that sunmouse means either
"BusMouse" or "PS/2" (I'm adding a patch so we can actually say "SunMouse"
or "Sun", but it all points to BusMouse, just like in 3.3.6). PS/2 is just
like the one on your Ultra. BTW, did you get the ati driver working? :)


/  Ben Collins  --  ...on that fantastic voyage...  --  Debian GNU/Linux   \
`  bcollins@debian.org  --  bcollins@openldap.org  --  bcollins@linux.com  '

Reply to: