Run process after the network interfaces are configured?

Using applications, configuring, problems
Post Reply
Message
Author
edwin.evans
Posts: 60
Joined: Thu 15 Nov 2012, 16:06

Run process after the network interfaces are configured?

#1 Post by edwin.evans »

Hi,

I want to start up a program, but only after my WiFi adapter is live. I see that rc.network is starting this up, but the README says it runs as a parallel process which I assume means I can't rely on it being finished at any particular point, so what is a good way to run my program only after rc.network is finished?

Or is there a way I can just start up my specific adapter and not run any of the network wizard related code? I don't really understand what rc.network is doing and I'm just interested in one type of wifi card which I can configure using suggestion at http://murga-linux.com/puppy/viewtopic.php?t=22469 but only after the light is blinking.

(I could put the call in rc.network but I want this to be simple to install and also for me rc.network exits in the middle of a big long function so it won't be clear what is going on to somebody else looking for this.)

Thanks!

edwin.evans
Posts: 60
Joined: Thu 15 Nov 2012, 16:06

Re: Run process after the network interfaces are configured?

#2 Post by edwin.evans »

edwin.evans wrote:Hi,

I want to start up a program, but only after my WiFi adapter is live. I see that rc.network is starting this up, but the README says it runs as a parallel process which I assume means I can't rely on it being finished at any particular point, so what is a good way to run my program only after rc.network is finished?

Or is there a way I can just start up my specific adapter and not run any of the network wizard related code? I don't really understand what rc.network is doing and I'm just interested in one type of wifi card which I can configure using suggestion at http://murga-linux.com/puppy/viewtopic.php?t=22469 but only after the light is blinking.

(I could put the call in rc.network but I want this to be simple to install and also for me rc.network exits in the middle of a big long function so it won't be clear what is going on to somebody else looking for this.)

Thanks!
Note, I created a separate message about starting the adapter at http://murga-linux.com/puppy/viewtopic. ... 004#690004, so for this one I'm interested in how to run a program after the network is all up. Thank you!

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#3 Post by seaside »

There is a discussion on this topic here
http://murga-linux.com/puppy/viewtopic. ... 720#689720

LIBL has a nice one liner test which could be put in a script as follows-

Code: Select all

#!/bin/sh
while true; do
sleep 1
[ $(grep up /sys/class/net/*/operstate) ] && break
done
-your program or code here-
Cheers,
s

edwin.evans
Posts: 60
Joined: Thu 15 Nov 2012, 16:06

#4 Post by edwin.evans »

seaside wrote:There is a discussion on this topic here
http://murga-linux.com/puppy/viewtopic. ... 720#689720

LIBL has a nice one liner test which could be put in a script as follows-

Code: Select all

#!/bin/sh
while true; do
sleep 1
[ $(grep up /sys/class/net/*/operstate) ] && break
done
-your program or code here-
Cheers,
s
Cool. Thanks!

Post Reply