Timothy Demulder dijo [Wed, Sep 17, 2003 at 05:52:59PM +0200]: > Hi, > > Could it be possible to start snort at a later time in the bootprocess? > I'm asking this because ppp starts S14 and snort starts S20. > Point is, pppd call <provider> takes a couple of seconds to negotiate an > ip with the ISP so snort doesn't have an ip on ppp0 when it gets called > and fails to start every single time. > > I guess I'm not the only one experiencing this ;) Hi, I think something like this in the init script would suffice: ----------------------- # Retry five times (arbitrary number - just don't sit there forever) STARTED='' for i in 1 2 3 4 5 do if [ "$STARTED" == "" ] then # Daemon has not yet been started if ( /sbin/ifconfig $INTERFACE >& /dev/null ) then # Interface is up - Start daemon snort-or-whatever STARTED=1 else # Wait a bit more echo -n . sleep 2 fi fi done ----------------------- Greetings, -- Gunnar Wolf - gwolf@gwolf.cx - (+52-55)5630-9700 ext. 1366 PGP key 1024D/8BB527AF 2001-10-23 Fingerprint: 0C79 D2D1 2C4E 9CE4 5973 F800 D80E F35A 8BB5 27AF
Attachment:
signature.asc
Description: Digital signature