Re: How-to auto-start programmes when I connect to Internet?
From: Christopher K. Johnson (ckjohnson_at_gwi.net)
Date: 02/14/04
- Previous message: allan grossman: "RE: named[696]: internal_send: 244.254.254.254#53: Invalid argument"
- In reply to: Hal Burgiss: "Re: How-to auto-start programmes when I connect to Internet?"
- Next in thread: Jef Spaleta: "Re: How-to auto-start programmes when I connect to Internet?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: fedora-list@redhat.com Date: Sat, 14 Feb 2004 10:30:11 -0500
Hal Burgiss wrote:
>On Fri, Feb 13, 2004 at 02:01:04PM +0000, Coume - Lubox.com wrote:
>
>
>>>Sure, write a script that checks for connection, and restarts whatever
>>>you want it to.
>>>
>>>
>>Could you explain a bit more? Because I do not know how to do what
>>you told me... :(
>>
>>
Guys - I think you are missing an easier solution.
Correct me if I am wrong, but I think the problem you are solving is this:
There is an ethernet connection to an ISP, and all you want to do is run
a script to restart services whenever that interface is brought up.
If that is the case just make a script /sbin/ifup-local that checks
whether the sole argument is the interface you care about, and if so,
performs the restarts.
Actually I like to put the ifup-local script in
/etc/sysconfig/network-scripts and add a symbolic link to it from
/sbin/ifup-local. That way I can keep my script in the same location as
the interface configurations.
Here is a sample script I used to set system time whenever an on-demand
ppp0 interface was started:
---------------------------------------------------------------
#!/bin/bash
#Invoked from ifup-post via /sbin/ifup-local ${DEVICE}
#The installer must add a symbolic link from /sbin/ifup-local to this script
if [ $1 = "ppp0" ] ; then
ntpdate=`ntpdate tock.usno.navy.mil 2>&1`
ntprc=$?
logger "ifup-local: $ntpdate"
if [ $ntprc -eq 0 ] ; then
clock -w
logger "ifup-local: clock -w performed"
fi
fi
---------------------------------------------------------------
-- ----------------------------------------------------------- "Spend less! Do more! Go Open Source..." -- Dirigo.net Chris Johnson, RHCE #807000448202021 -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
- Previous message: allan grossman: "RE: named[696]: internal_send: 244.254.254.254#53: Invalid argument"
- In reply to: Hal Burgiss: "Re: How-to auto-start programmes when I connect to Internet?"
- Next in thread: Jef Spaleta: "Re: How-to auto-start programmes when I connect to Internet?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|