Re: Re: ipupload
Ciao Eric G . Miller,
> > file to my website. But when I disconnect I can execute another script
> > in ip-down.d because I use 'kill `cat /var/run/ppp0.d`' which is not a
> > proper downing of route ppp0.
> Since the ip-down script run *after* the link goes down, you obviously
> can't put the script there.
I have modified ip-up and poff script:
# Main Script starts here
-rwxrwx--- 1 root dialout 141 May 1 15:11 00*
-rwxrwx--- 1 root dialout 690 Jul 23 14:41 fetchmail*
-rwxr-xr-x 1 root root 327 Oct 6 13:48 postfix*
-rwxrwx--- 1 root dialout 1128 Oct 8 23:48 slrnpull*
-rwxrwx--- 1 root dialout 184 Oct 21 03:06 zz*
so after running programs in ip-up.d, I run programs in online... ***
# Lets see how many pppds are running....
#set -- `cat /var/run/ppp0.pid 2>&1 /var/log/PPP.log`
case $# in
0) # pppd only creates a pid file once ppp is up, so let's try killing pppd
*** ... the same programs that I run BEFORE killing pppd.
So it works like this:
* online *
* online *
If you want to update your network-state on a web-page, using the same
script "/etc/ppp/online/update-my-web-page" you can chek the presence of
ip-up/pon or ip-down/poff in memory:
if [ "`pidof pon`" ] ; then
echo "Going online ..."
if [ "`pidof poff`" ] ; then
echo "Going offline ..."
echo "What are you doing?"
if [ "`pidof gdm`" ] ; then
echo "GDM running ... did you know? :-)"
BTW.... I don't like run-parts.
I dont' understand why a so trivial task must be done by a binary.
It' equivalent to 3-line script:
for FILE in `ls /etc/ppp/online` ; do
Paolo Pedaletti, Como, ITALYa
paolo . pedaletti @ flashnet . it
pub 1024D/09120D83 1999-06-11 Paolo Pedaletti (Linux) <firstname.lastname@example.org>
Key fingerprint = 0058 45AE B7D3 D603 7D0E D9B8 26E6 01E0 0912 0D83
sub 2048g/F0A8E667 1999-06-11
- From: "T.V.Gnanasekaran" <email@example.com>
- Re: ipupload
- From: "Eric G . Miller" <firstname.lastname@example.org>