[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Waiting for scripts in /etc/ppp/ip-up.d



Hello:

Wouldn't it just be cleaner to use dial on demand (diald)
which would automatically bring up and/or turn down the
link based on idle time.

Peter

-----Original Message-----
From: Moore, Paul <Paul.Moore@uk.origin-it.com>
To: 'Debian Users' <debian-user@lists.debian.org>
Date: Wednesday, October 21, 1998 6:41 AM
Subject: Waiting for scripts in /etc/ppp/ip-up.d


>Background:
>I have my PPP connection to my ISP set up, pretty much out of the box.
>In /etc/ppp/ip-up.d, I have some scripts, one to send queued mail, one
>to get a newsfeed via slrnpull. I will probably add extra scripts later
>(mirror my homepages, download new packages, cache web pages,
>whatever...)
>
>My ISP also sends my Email via SMTP while I'm online. I can tell when
>it's finished by fingering the post machine, and checking if it has any
>messages left for me.
>
>What I'd like to do is to write a script which starts the PPP
>connection, then waits for all the ip-up.d scripts to run, and for my
>mail to finish arriving, and then drops the connection with poff
>(actually, I'd like it to ask me whether it was OK to go offline, and
>allow me to override, but that's not too hard).
>
>So, my question - can I do this? My guess is that I somehow need to loop
>checking on the status of the various processes (probably by parsing ps
>aux output) until everything has completed. But that may be messy, and
>it almost certainly needs significant admin when I add new ip-up
>scripts. I thought about using pstree or something, to look for children
>of the pon script - does that work?
>
>Any pointers?
>
>Thanks,
>Paul Moore.
>
>PS Is it possible for a script to tell if it's running under X? Ideally,
>I'd like to query the user via a dialog box if in X, but use a normal
>stdin read otherwise...
>
>
>--
>Unsubscribe?  mail -s unsubscribe debian-user-request@lists.debian.org <
/dev/null
>
>
BEGIN:VCARD
VERSION:2.1
N:Iannarelli;Peter
FN:Peter Iannarelli
ORG:GenX Internet Laboratories
TITLE:Engineer
TEL;WORK;VOICE:1+ 416-929-1885
TEL;WORK;FAX:1+416-929-1056
ADR;WORK:;Madison;20 Madison Ave.;Toronto;Ontario;;Canada
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:Madison=0D=0A20 Madison Ave.=0D=0AToronto, Ontario=0D=0ACanada
URL:
URL:http://www.genxl.com
EMAIL;PREF;INTERNET:Peter.Iannarelli@genxl.com
REV:19981021T105212Z
END:VCARD

Reply to: