[SGVLUG] My ISP restricting my connect time. How to get info fast.
John E. Kreznar
jek at ininx.com
Wed Feb 22 04:35:43 PST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
David Lawyer <dave at lafn.org> writes:
> I recently posted that it took about 36 hours to upgrade my Debian to
> the latest "testing" version (not really a version) using a 28.8k
> modem.
I hope you're using apt-proxy so all those downloads are now mirrored
at your site in a form where they will automatically be used for the
next install.
> ... I use fetchmail to get my mail and exim to send it. ... And
> both seem to run as daemons ...
You could change that.
> The problem is, how to detect when they're both done. I would
> rather not have to bother to write a script to do this. Any
> suggestions.
Break down and write scripts. Wrap both fetchmail and exim in scripts
which first use lockfiles to hold the connection up, and then when
they're done, use a conditional "poff-if" to tear it down if they're
the last user. Scripts appended below are not what you need, but
might be useful for reference.
> There's also the problem of minimizing connect time using the lynx
> browser. When I go to a site that has an html doc I want to read, how
> do I download all the html files the doc has been split up into? I
> manually used wget for this but it was a chore to type a long url into
> it.
Use wwwoffle. It's a debian package.
#!/bin/sh
# SYNOPSIS
# pon-if <id>
# DESCRIPTION
# Lock file /var/lock/modem-users.lock to gain exclusive access
# to the /var/lock/modem-user-*.lock name-space. Then if the
# modem link is down, remove possible (stale) files in this
# name-space and bring the modem up. Then add <id> to the list
# of current users of the modem by creating a file
# /var/lock/modem-user-<id>.lock. Finally, release the lock on
# the /var/lock/modem-user-*.lock name-space.
# Uses /var/lock/LCK..modem to test whether the modem link is
# up. (What's a better way?)
# SEE ALSO /usr/bin/poff-if
lockfile /var/lock/modem-users.lock
if [ ! -e /var/lock/LCK..modem ] ; then
rm -f /var/lock/modem-user-*.lock
/usr/sbin/pppd call provider
fi
touch /var/lock/modem-user-$1.lock
rm -f /var/lock/modem-users.lock
#!/bin/sh
# SYNOPSIS
# poff-if <id>
# DESCRIPTION
# Lock file /var/lock/modem-users.lock to gain exclusive access
# to the /var/lock/modem-user-*.lock name-space. Then delete
# <id> from the list of current users of the modem by removing
# any file /var/lock/modem-user-<id>.lock. If this leaves no
# remaining current users of the modem, take down the modem
# link. Finally, release the lock on the
# /var/lock/modem-user-*.lock name-space.
# SEE ALSO /usr/bin/pon-if
lockfile /var/lock/modem-users.lock
rm -f /var/lock/modem-user-$1.lock
if [ -z "$(ls /var/lock/modem-user-*.lock 2>/dev/null)" ] ; then killall -q -w pppd ; fi
rm -f /var/lock/modem-users.lock
- --
John E. Kreznar jek at ininx.com 9F1148454619A5F08550 705961A47CC541AFEF13
... who has not requested or consented to any political jurisdiction.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.6 <http://mailcrypt.sourceforge.net/>
iD4DBQFD/FqPYaR8xUGv7xMRAsdPAJ9k+DFmrdQ3PHiTWZttwdm7Ku/o2ACYyfYU
K/7JgRBdRjpUo2OoneOn9w==
=jIHH
-----END PGP SIGNATURE-----
More information about the SGVLUG
mailing list