devfs symlink over device doesn't work

Stef Walter stef at memberwebs.com
Tue Jun 26 23:14:00 UTC 2007


After deleting a device in devfs, any symlink placed over it results in
ENOENT.

  # cd /dev
  # rm console
  # touch /var/log/console
  # ln -s /var/log/console console
  # ls -l console
  ls: console: No such file or directory

I'd like to fix this behavior. Or is there a reason for it that I'm not
seeing?

Reasoning:

I'm using devfs in jails, and I'd like anything written (by user space
programs, syslogd, etc...) to /dev/console to go to a file in the jail.
So at jail startup I'd like to put a symlink over /dev/console to a
normal file.

Cheers,
Stef Walter



More information about the freebsd-hackers mailing list