/etc/ppp/ip-up.local

Post Reply
Message
Author
slasher
Posts: 2
Joined: 17. Sep 2000 18:31
Location: Friedrichshafen
Contact:

/etc/ppp/ip-up.local

#1 Post by slasher »

Hi,

ich will, dass wenn ich online gehe, dass dann automatisch ein script ausgeführt wird...
ich habe es mit der /etc/ppp/ip-up.local versucht.. aber ohne ein ergebnis.. wie könnte ich es noch versuchen ??

cu Robert

User avatar
killerhippy
Posts: 529
Joined: 19. May 2000 19:36
Contact:

Re: /etc/ppp/ip-up.local

#2 Post by killerhippy »

/etc/ppp/ip-up.local muß ausführbar sein und für executables absolute Pfade enthalten
Es gibt keine dumme Fragen!

Killerhippy

slasher
Posts: 2
Joined: 17. Sep 2000 18:31
Location: Friedrichshafen
Contact:

Re: /etc/ppp/ip-up.local

#3 Post by slasher »

So.. jetzt war mir mal wieder langweilig, und ich hab mich wiedermal dem Problem zugewant...

ip-up.local hat die rechte -rwx-r-xr-x.. und sieht so aus:
<blockquote><pre><font size="1" face="">code:</font><hr><font face="Courier New" size="2">
#!/bin/sh


[ -x /usr/local/pmfirewall/pmfirewall ] && /usr/local/pmfirewall/pmfirewall start

BASENAME='basename $0'
TMP=/var/log/ip-up.log
INTERFACE=$1
DEVICE=$2
SPEED=$3
LOCALIP=$4
REMOTEIP=$5

/sbin/route add default gw $REMOTEIP dev $INTERFACE

/files/linuxprog/dom2ip/./getip.pl
</font><hr></pre></blockquote>

und das script getip.pl sollte engentlich was in die /var/log/messages schreiben... doch da kommt nix... (wenn ich getip.pl so ausführ, dann gehts..)

cu Robert

hugenay

Re: /etc/ppp/ip-up.local

#4 Post by hugenay »

du musst dem skript explizit die entsprechenden Ausgabe/Eingabekannäle mitteilen!
0=STDIN, 1=STDOUT, 2=STERR

also entweder wird ipup.local mit >/var/log/messages 2>&1 aufgerufen, oder das perl-skript.

erst wird 1 in die messages umgeleitet, und dann 2 in 1, das ja in die messages umgeleitet wird. Andersrum gehts nicht.
gruss hug.

Post Reply