VectorLinux

Please login or register.

Login with username, password and session length
Advanced search  

News:

Visit our home page for VL info. For support and documentation, visit the Vector Linux Knowledge Center or search the Knowledge Center and this Forum using the search box above.

Author Topic: FIXED: /dev/modem symlink gets hijacked?!  (Read 1768 times)

ernie

  • Member
  • *
  • Posts: 2
FIXED: /dev/modem symlink gets hijacked?!
« on: August 23, 2007, 10:27:01 pm »

I make the

'sudo ln -s /dev/ttyACM0 /dev/modem'

And then I can use dialup.  But everytime I restart the PC, the symlink changes to /dev/ttyS0.  What causes this?
« Last Edit: August 24, 2007, 04:09:24 pm by ernie »
Logged

ernie

  • Member
  • *
  • Posts: 2
Re: FIXED: /dev/modem symlink gets hijacked?!
« Reply #1 on: August 24, 2007, 04:15:52 pm »

I'm still not sure what was 'hijacking' the symlink, but I've got a fix by adding these lines to /etc/udev/rules.d/udev.rules:

# Motorola USB cell modem
KERNEL=="ttyACM0",      NAME="%k", SYMLINK="modem", GROUP="tty"

Now the symlink /dev/modem will point to /dev/ttyACM0 even after a restart.  Tried this method after reading the info in:

http://www.linuxformat.co.uk/pdfs/LXF66.tut_udev.pdf

Not sure if this solution is proper, but it does work in this case!
Logged

rbistolfi

  • Packager
  • Vectorian
  • ****
  • Posts: 2322
Re: FIXED: /dev/modem symlink gets hijacked?!
« Reply #2 on: August 24, 2007, 05:39:00 pm »

LOL I was investigating about your issue, I came here with the same solution. Here is my source:

http://reactivated.net/writing_udev_rules.html

Not sure if this solution is proper, but it does work in this case!

I think is the best solution. Udev itself was overwriting your symlink. The dirty solution would be add ln -s /dev/ttyACM0 /dev/modem to the end of your /etc/rc.d/rc.local, but you are more elegant than that ;)
Logged
"There is a concept which corrupts and upsets all others. I refer not to Evil, whose limited realm is that of ethics; I refer to the infinite."
Jorge Luis Borges, Avatars of the Tortoise.

--
Jumalauta!!