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

Re: 2.6.8.1-kernel on Powerbook G4?



On Wed, Aug 25, 2004 at 02:53:22AM +0200, Timo Reimerdes wrote:
| > | It got me thinking - could it help to add lines like:
| > | L tty1  /dev/vc/1
| > | L tty2  /dev/vc/2
| > | L tty3  /dev/vc/3
| > | L tty4  /dev/vc/4
| > | L tty5  /dev/vc/5
| > | L tty6  /dev/vc/6
| > | to the /etc/udev/links.conf?

BTW,
    L tty1  vc/1
would work too, since the path is relative to where the link itself is
located.  Relative links would work even if udev is configured to
manage something other than /dev (though I can't imagine why you would
want that unless you are testing code changes in udev without
affecting the system's /dev).

| > I would say that is not the best solution.  I am under the impression
| > that the debian maintainer added links.conf to udev as an interim
| > workaround for certain limitations in certain versions of udev and the
| > kernel.  (for example, earlier 2.6 kernels didn't have any sysfs info
| > for the framebuffer and some other devices like that needed this
| > "hard-coded" information)
| 
| If it is an interim solution isn't the Linking way kindof correct?

Yes.

| After all - if I got you right - vc/x is the way it is going to be.

Only if that's the configuration you choose :-).  One of udev's key
features is that you now have the power to choose the device names you
want by modifying/creating config files for a userspace program.

| So the links to tty should not really pose any Problems if things
| get up-to- date, should they? 

The links themselves aren't a problem.  It's the manner they are being
created that is sub-optimal (from a purist sort of perspective).

| > The better approach, IMO, is to create the apropriate udev rules so
| > the files/links are created automatically (instead of statically
| > through links.conf) or to adjust the inittab to look for the
| > devfs-style name.
|
| I didn't want to touch the rules themselves because I have seen 
| them being updated on several occasions and I wouldn't want to have
| to readjust them everytime that happens. Since udev is kindof new I
| wouldn't want to miss an important update either. 

I fully agree.  If you are using a recent version, then you don't need
to edit any of the conffiles provided by the package.  Simply create a
new .rules file in /etc/udev/rules.d and put your rules there.  If you
are using the package-provided devfs rules (like I am) you could also
just add in the package-provided compatibility rules (like I did)
instead of writing your own rules for these links.

The real benefit to creating your own udev rules is the ability to
make devices users will interact with have meaningful and consistent
names.  For example "memory-stick" instead of "sda" for a USB storage
device.  (also having the same name for such hot-pluggable devices if
they are found in a different order, for example having both a camera
card reader and a memory stick)

| > What version of udev are you using?  At some point the directory
| > /etc/udev/rules.d was introduced as a way to specify which rules you
| > want udev to apply.  By default it contains a symlink to
| > /etc/udev/udev.rules which is a set of rules creating traditional
| > names.  On my systems, since I had used devfs for quite some time, I
| > remove that link and instead put symlinks to /etc/udev/devfs.rules and
| > /etc/udev/compat-full.rules.  The former gives devfs-style names, and
| > the latter creates the "comaptibility" symlinks like devfsd used to
| > do.
|
| Interesting - once more I learned something :) thx.
| 
| > I also changed my inittab to have the following section:
| >     1:2345:respawn:/sbin/getty 38400 tty1 -f /etc/issue.linuxlogo
| >     2:23:respawn:/sbin/getty 38400 tty2 -f /etc/issue.linuxlogo
| >     3:23:respawn:/sbin/getty 38400 tty3 -f /etc/issue.linuxlogo
| >     4:23:respawn:/sbin/getty 38400 vc/4
| >     5:23:respawn:/sbin/getty 38400 vc/5
| >     6:23:respawn:/sbin/getty 38400 tty6
| > 
| > With some gettys using the traditional name and some using the
| > devfs-style name I will have at least one console functioning
| > regardless of what sort of /dev configuration I boot with.  (basically
| > this is just a safety net in case somehow I boot and the symlinks
| > aren't there or something)
|
| So I could alternatively have changed the tty1 in the inittab to vc/1?

Yes.

| And that sould have had the same effect as letting getty look at tty1
| linked to vc/1. Hm. Sounds like the "cleaner" approach. Might try that,
| too.

I would agree that updating your inittab is cleaner than using
/etc/udev/links.conf.

-D

-- 
If your life is a hard drive,
Christ can be your backup.
 
www: http://dman13.dyndns.org/~dman/            jabber: dman@dman13.dyndns.org

Attachment: signature.asc
Description: Digital signature


Reply to: