| Summary: | /dev/vga is created by rc.devfs - even when there is no ttyv0/vga | ||
|---|---|---|---|
| Product: | Base System | Reporter: | Dirk-Willem van Gulik <dirkx> |
| Component: | misc | Assignee: | Doug Barton <dougb> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | Unspecified | ||
| Hardware: | Any | ||
| OS: | Any | ||
|
Description
Dirk-Willem van Gulik
2002-06-16 23:10:01 UTC
On Sun, 16 Jun 2002, Dirk-Willem van Gulik wrote: > >Description: > At the end of rc.devfs: > > # Setup DEVFS, ie permissions, links etc. > # > ln -fs /dev/ttyv0 /dev/vga > > regardless of the presense of a vga/ttyv. > > >How-To-Repeat: > install according to diskless on a headless machine (e.g. net4501). > >Fix: > Add something along the lines of > > if [ -e /dev/ttyv0 ]; then > ln -fs /dev/ttyv0 /dev/vga > fi This leaves about 10 bugs in the 2 (now 4) devfs-specific lines in this file: - rc files should not create anything unless configured to do so. They especially shouldn't delete correct links unconditionally. (The correct link is created by MAKEDEV; it is vga -> ttyv0, not vga -> /dev/ttyv0.) - /dev/vga is compatibilty cruft for a 1993ish version of X (but I think current X's still use it because of their own compatibility cruft). It is an especially bad example to put in a file with only 1 example. - [... comments about style bugs deleted] Bruce On Mon, 17 Jun 2002, Bruce Evans wrote: > > Add something along the lines of > > > > if [ -e /dev/ttyv0 ]; then > > ln -fs /dev/ttyv0 /dev/vga > > fi > This leaves about 10 bugs in the 2 (now 4) devfs-specific lines in > this file: I am confused. Today (i.e. in 5-CURRENT) it says: # Setup DEVFS, ie permissions, links etc. # ln -fs /dev/ttyv0 /dev/vga > - rc files should not create anything unless configured to do so. They > especially shouldn't delete correct links unconditionally. (The > correct link is created by MAKEDEV; it is vga -> ttyv0, not vga -> > /dev/ttyv0.) So you argue that the existing rc.devfs should not create the above at all but leave it to MAKEDEV ? > - /dev/vga is compatibilty cruft for a 1993ish version of X (but I think > current X's still use it because of their own compatibility cruft). It > is an especially bad example to put in a file with only 1 example. > - [... comments about style bugs deleted] Or do you argue that the existing rc.devfs should be empty ? Dw. On Mon, 17 Jun 2002 dirkx@covalent.net wrote: > On Mon, 17 Jun 2002, Bruce Evans wrote: > > This leaves about 10 bugs in the 2 (now 4) devfs-specific lines in > > this file: > > I am confused. Today (i.e. in 5-CURRENT) it says: > > # Setup DEVFS, ie permissions, links etc. > # > ln -fs /dev/ttyv0 /dev/vga > > > - rc files should not create anything unless configured to do so. They > > especially shouldn't delete correct links unconditionally. (The > > correct link is created by MAKEDEV; it is vga -> ttyv0, not vga -> > > /dev/ttyv0.) > > So you argue that the existing rc.devfs should not create the above at all > but leave it to MAKEDEV ? MAKEDEV just provides a template for the correct devices. (One reason I don't believe in devfs is that it doesn't even create devices with the same names and attributes after N years of development, starting with /dev itself not having the permissions specified in /etc/mtree/BSD.root.dist.) > > - /dev/vga is compatibilty cruft for a 1993ish version of X (but I think > > current X's still use it because of their own compatibility cruft). It > > is an especially bad example to put in a file with only 1 example. > > - [... comments about style bugs deleted] > > > Or do you argue that the existing rc.devfs should be empty ? It should have commented out examples like most other rc files that don't have knobs in rc.conf, and it should have more than 1 example. If /dev/vga is actually non-optional, then it should be created by the driver and not by rc.devfs. Symlinks for devices should always be optional but this may be impractical for very old compatibility cruft like /dev/vga. Bruce State Changed From-To: open->closed I improved the vga example slightly, and committed some more examples, ala Bruce's suggestions. Still not perfect, but better. Responsible Changed From-To: freebsd-bugs->dougb I did the deed. |