Skip to contentSkip to conversation

if-up et al script relocation

DISCUSSION bfc 4 participants 5 messages Feb 13, 2008 – Feb 14, 2008 PPP protocol drivers and compressors

lore
Share & tools
lore

bfc

author
#0 lore raw

Is it possible to relocat the if-up, if-down, auth-up... scripts to somewhere other than
/etc/ppp. We'd like to use our custom scripts for our app w/o interfering with any
customer use of PPP.

If that's not possible, is it possible to have some variant of if-up and friends for only particular
ttyname -- the Doc shows an alternate options file for a particular ttyname, but not the rest
of the stuff. (OR... if there was a magic option to plant the default scripts elsewhere.)

Thanks!

Signature · 2 lines
View this message in context: http://www.nabble.com/if-up-et-al-script-relocation-tp15468731p15468731.html
Sent from the linux-ppp mailing list archive at Nabble.com.
#1 lore raw
Quoted 5 lines · bfc

Is it possible to relocat the if-up, if-down, auth-up... scripts to somewhere other than
/etc/ppp. We'd like to use our custom scripts for our app w/o interfering with any
customer use of PPP.

Debian has a patch which does this for some of the files, it should be made more general and submitted for inclusion.

Signature · 2 lines
ciao,
Marco
#2 lore raw
In reply to bfc
Quoted 7 lines · bfc

If that's not possible, is it possible to have some variant of if-up and friends for only particular
ttyname -- the Doc shows an alternate options file for a particular ttyname,
but not the rest
of the stuff. (OR... if there was a magic option to plant the default scripts elsewhere.)

Each of the scripts you mentioned is passed a tty-device as an argument, which means you can easily put your per-tty logic into a single script.

Signature · 2 lines
Eugene Paskevich             |   *=)-----------   |     Plug me into
[email protected]        |   -----------(=*   |      The Matrix
#3 lore raw
In reply to bfc

You can relocate them by producing a custom build of pppd with a changed value for the _PATH_IPUP define in pathnames.h.

You can also write a plug-in for your application that uses the ip_up_hook() to call your own script using ipcp_script(). Plugins are selected by pppd options.

Debian carries a patch to pppd that iterates through each script in /etc/ppp/if-up.d ... this can also be found in Ubuntu ... it is made more useful setting ipparam on the pppd options, and testing the value within the scripts.

Signature · 3 lines
James Cameron                         http://quozl.netrek.org/
HP Open Source, Volunteer             http://opensource.hp.com/
PPTP Client Project, Release Engineer http://pptpclient.sourceforge.net/
author
#4 lore raw
In reply to bfc

Thanks everyone.

We've been using a custom build for some time, and wanted to get away from that. Inertia being what it is, we let an
old version linger for too long (2.4.1?) and now need to move to 2.4.4 for various fixes and its structureed differently enough
to cause a bit of real work.

I meant ip-up ip-down... not if-up if-down, DUH. (I've made this mistake repeatedly.)

The plugin is an interesting thought, though perhaps beyond the current scope/schedule. At least that would let us
continue moving forward as new pppd versions came out (we just follow RHEL versions).

So I guess it comes down to customizing any existing ip-up/ip-down/auth-up scripts (based on the tty), but I do like the thought of combining all of our logic into one script. That would reduce the clutter, and could look something like a service script.
It can be a switch on the action, doing our little things based on the arguments we need.

Thanks again for your responses!

Signature · 2 lines
View this message in context: http://www.nabble.com/if-up-et-al-script-relocation-tp15468731p15472625.html
Sent from the linux-ppp mailing list archive at Nabble.com.