Announcement

Collapse
No announcement yet.

permanent symbolic links?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    permanent symbolic links?

    I was hoping for some help from someone with far more wisdom that myself, but any help would be appreciated. Here's the problem: I installed my modem driver which just so happens to be located at /dev/ttyS_PCTEL0. Kppp does not have this listed as an option in its modem configuration tab, so I have had to make a symbolic link from /dev/ttyS_PCTEL0 to /dev/modem in order for Kppp to find my modem and dial to the internet. This wouldn't be so bad, except that every time I restart the computer, I have to recreate this symbolic link. Does anyone know how I can make this link permanent?

    Thank you for you time and help!!!
    dbucky

    #2
    Re: permanent symbolic links?

    I'm not 100% sure this'll work, but you can try this.

    Create a script for the command:
    Code:
    sudo nano /etc/init.d/linkmodem.sh
    Then in the empty text document, type
    Code:
    #!/bin/sh
    sudo ln -s /dev/ttyS_PCTEL0 /dev/modem
    and save (Control-X, Y, Enter) and make it executable:
    Code:
    sudo chmod +x /etc/init.d/linkmodem.sh
    Linux is ready for the desktop--but whose desktop?<br />How to install software in Kubuntu

    Comment


      #3
      Re: permanent symbolic links?

      Originally posted by aysiu
      I'm not 100% sure this'll work, but you can try this.

      Create a script for the command:
      Code:
      sudo nano /etc/init.d/linkmodem.sh
      Then in the empty text document, type
      Code:
      #!/bin/sh
      sudo ln -s /dev/ttyS_PCTEL0 /dev/modem
      and save (Control-X, Y, Enter) and make it executable:
      Code:
      sudo chmod +x /etc/init.d/linkmodem.sh
      Wouldn't this route need the step of creating the proper symlinks in the /etc/rc.* directories for the runlevels you wish to enable it to actually run during boot? You can do this with 'update-rc.d' (see 'man update-rc.d' for details), or via the 'System Services' System Settings module.

      Also, as init.d scripts are run as root, the 'sudo' is redundant on the ln command.

      As a quicker solution (creating an init.d script for just one command seems a bit heavy ), you could add the ln command (ln -s /dev/ttyS_PCTEL0 /dev/modem) to /etc/rc.local.

      (rc.local is an init script that is run on the later stages of the boot process, though it does nothin by default. It's a good place to run simple commands you want to run at the end of the boot process)

      You can edit rc.local to add the command (ln -s /dev/ttyS_PCTEL0 /dev/modem) with:
      Code:
      kdesu kate /etc/rc.local
      (Just make sure you place it below '#!/bin/sh' and above 'exit 0' on the file.)

      Comment

      Working...
      X