Koozali.org: home of the SME Server

Permenant symlinks in /dev - How?

allsorts

Permenant symlinks in /dev - How?
« on: April 13, 2006, 01:15:27 PM »
Hi,

Trying to get a couple of /dev symlinks to survive a reboot. I've looked at the MAKEDEV man page, not that it helped a lot. Tried adding a file "local" in /etc/makedev.d with the contents:

l /dev/lcd /dev/ttyS0

Rebooted, on the basis that something removes the links during a reboot ought to put 'em back if told about them but no good. Same with just running MAKEDEV, just prints  the "help" <cough> information

Google doesn't help a lot either. I suspect it's a blindingly obvious command or google incantation, provided you know what it is in the first place...

Cheers
Dave.

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Permenant symlinks in /dev - How?
« Reply #1 on: April 13, 2006, 10:42:23 PM »
Hello Dave

7.0 is using udev.

Have a look at this link

http://reactivated.net/writing_udev_rules.html

It might help with your problem.

Kind Regards

Selintra

allsorts

Permenant symlinks in /dev - How?
« Reply #2 on: April 14, 2006, 03:42:47 AM »
Thanks, like I said blindingly obvious when you know the answer...

Anyway for completeness you need to create a file in /etc/udev/rules.d that will be processed before the defaults in the 50-udev.rules file. I used 10-local.rules (the .rules suffix is required). For my simple requirement I just needed to put:

KERNEL="ttyS0", SYMLINK="lcd"

in the 10-local.rules file.

Cheers
Dave.