Results 1 to 3 of 3

Thread: ip-up.custom and ip-down.custom scripts?

  1. #1

    ip-up.custom and ip-down.custom scripts?

    Is there anyway to run a custom script in addition to the built-in one when ppp connects/disconnects? I know that ip-up and ip-down are symlinked to /sbin/rc which is a binary file. I would like to run the custom script after the call to /sbin/rc.

  2. #2
    Quote Originally Posted by Khurram View Post
    Is there anyway to run a custom script in addition to the built-in one when ppp connects/disconnects? I know that ip-up and ip-down are symlinked to /sbin/rc which is a binary file. I would like to run the custom script after the call to /sbin/rc.
    The solution is elementary.

    Replace symlinks /tmp/ppp/ip-down and /tmp/ppp/ip-up with your script. In the script, before or after, depending on the requirements, call the old script with parameters:

    /tmp/ppp/ip-up $@
    or
    /tmp/ppp/ip-down $@
    2008-2013 ABATAPA WL-500gP/128M / Asus RT-N16 / USB Flash / VLAN / PPPoE / VoIP / nShaper / NAS: iStor is607, Sarotech NAS-20, QNap 109 Pro / NFS / / etc

  3. #3
    Quote Originally Posted by ABATAPA View Post
    /tmp/ppp/ip-up $@
    or
    /tmp/ppp/ip-down $@
    If you mean "/sbin/rc $@" (since originally the /tmp/ppp/ip-up script is linked to /sbin/rc), then I have already tried it and it does not work. I think the /sbin/rc script does things like setting up masquerading, updating /tmp/resolve.conf, updating time, etc. None of these are executed if called like "/sbin/rc $@".

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •