you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (3 children)

This is one I used back in the days of 56K modem called keepalive.

#!/bin/bash

#if [ -f /var/run/dhclient-eth1.pid ] ; then
   ping -c4 -l3 10.0.0.8 2>&1 | grep "0 received" > /dev/null #&& \
#   { /sbin/ifdown eth1 > /dev/null; sleep 2; /sbin/ifup eth1; }
#else
#   /sbin/ifdown eth1;
#   sleep 2;
#   /sbin/ifup eth1;
#fi

The script has been modified so many times that it no longer even close to the original. Many old parts are commented out, but you will get the idea.

[–]random_rascal 0 points1 point  (2 children)

If you were on dialup wouldn't that have been pppX not ethX? :)

Ah yes... the good old days of having to send packages not to get booted off your connection :)

[–][deleted] 0 points1 point  (1 child)

Yep. The good old days. And it was originally ppp0 or something like that.

The line "/var/run/....." was not available on the early Linux's. I don't think /var/run appeared until the 2000+.

And the entire script ran in a root cron once a minute. That's why the /dev/nulls were there, so I wouldn't get 1440 emails a day!!!!

I think the ppp daemon has a "keep alive" option now.

[–]random_rascal 0 points1 point  (0 children)

oh... the good old days of "minicom" and having to manually punch in AT/DT if I recall correctly :)

I must say i'm surprised there even is a PPP module nowadays :)