Lørdag 23 oktober 2004 16:54 kvad Leendert Meyer:
On Saturday 23 October 2004 15:40, Johnny Ernst Nielsen wrote:
Good day,
SUSE 9.0
Is there a place where I can put a script to be executed whenever any interface connects to the internet?
Like /etc/ppp/ip-up.d/ is the place for ppp0 connections, only somewhere that works for both eth0 and ppp0 (and possibly for other interfaces).
I have tried fumbeling with /etc/sysconfig/network/if-up.d/, but that does not work for ppp0 I have tried making /etc/sysconfig/network/ip-up.d/ (not iF-up) and putting a script there, but then nothing happens for any interface.
The scripts need to be executable: chmod +x some_script
They are: me@mycomputer:~> ls -l /etc/sysconfig/network/ip-up.d/ totalt 4 -rwxr-xr-x 1 root root 88 2004-10-24 08:13 script.sh me@mycomputer:~> The script looks like this: #!/bin/bash echo "/etc/sysconfig/network/ip-up.d/script.sh called" >> /tmp/ ipuptest.txt #End of script /tmp/ipuptest.txt is never created The script does what it says when run manually by root. Do I need to do anything else except putting an executable script in / etc/sysconfig/network/ip-up.d/ ? Any variables that needs to be set? Any files that needs to edited? Best regards Johnny :o)