lkml.org 
[lkml]   [2003]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: udev for dummies
David T Hollis wrote:

>On Thu, 2003-12-11 at 17:16, J.A. Magallon wrote:
>
>
>>Hi all...
>>
>>I am starting to use 2.6, and I really would like to use udev.
>>But I can't find a doc about how to move from taditional heavily
>>populated /dev to new method.
>>
>>Any pointer ?
>>
Do you may mean heavily **over-populated**
/dev? Learning more about devfs would make it
easier to transition to udev. I'm going through this
now for myself.

You could learn how to strip out non-existent
devices from /dev by using
/etc/devfs/compat_symlinks
by using regular expressions there to make symlinks
for standard device names like udev uses but only
permit devfsd to make device entries for devices
you have on your system.

Here is my /etc/devfs/compat_symlinks. At the
top I don't use anything but devfs naming, then
at the bottom I add a few symlinks both to limit
naming to real devices(see md*) and to make
conventional sd* hd* to make transition to
udev simpler.

-Bob

# Enable full compatibility mode for old device names. You may comment these
# out if you don't use the old device names. Make sure you know what you're
# doing!
#########REGISTER .* MKOLDCOMPAT
UNREGISTER .* RMOLDCOMPAT

# You may comment out the above and uncomment the following if you've
# configured your system to use the original "new" devfs names or the really
# new names
#####REGISTER ^vc/.* MKOLDCOMPAT
UNREGISTER ^vc/.* RMOLDCOMPAT
#####REGISTER ^pty/m0 MKOLDCOMPAT
######REGISTER ^pty/s0 MKOLDCOMPAT
UNREGISTER ^pty/.* RMOLDCOMPAT
######REGISTER ^misc MKOLDCOMPAT
UNREGISTER ^misc RMOLDCOMPAT

# You may comment these out if you don't use the original "new" names
######REGISTER .* MKNEWCOMPAT
UNREGISTER .* RMNEWCOMPAT

# Create compatibility links for broken USB serial driver
REGISTER ^usb/tts/([0-9]+) CFUNCTION GLOBAL symlink $devname ttyUSB\1
#######UNREGISTER ^usb/tts/([0-9]+) CFUNCTION GLOBAL unlink ttyUSB\1

# Create compatibility link for broken misc/net/tun driver (must uncomment the
# MKOLDCOMPAT for misc above if you want to use this)
######REGISTER ^misc/net/tun$ CFUNCTION GLOBAL unlink net/tun
######REGISTER ^misc/net/tun$ CFUNCTION GLOBAL symlink /dev/$devname net/tun

# Bob removes non-existent /dev/md's, adds old conventional devices
# to aid transition to udev as this percolates through /etc/init.d
# scripts for fsck and mount--
REGISTER ^md/[0-4] MKOLDCOMPAT
UNREGISTER ^md/[5-9][0-9]* RMOLDCOMPAT
REGISTER ^ide/host[0-2]/.* MKOLDCOMPAT
REGISTER ^scsi/host[0-2]/bus0/target[0-3]/.* MKOLDCOMPAT
REGISTER ^snd/.* MKOLDCOMPAT
REGISTER ^sound/.* MKOLDCOMPAT
REGISTER ^misc/rtc MKOLDCOMPAT





-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:59    [W:0.046 / U:2.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site