Ignore:
Timestamp:
2007-03-18T18:36:54+01:00 (10 years ago)
Author:
florian
Message:

Fix pid writing with olsrd (#1480)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • packages/net/olsrd/files/olsrd.init

    r5128 r6609  
    22# Copyright (C) 2006 OpenWrt.org 
    33 
     4BIN=olsrd 
    45DEFAULT=/etc/default/olsrd 
     6RUN_D=/var/run 
     7PID_F=$RUN_D/$BIN.pid 
    58 
    69start() { 
    710        [ -f $DEFAULT ] && . $DEFAULT 
    8         olsrd $OPTIONS 
     11        $BIN -nofork $OPTIONS & 
     12         
     13        # write pid file (but strip out own pid ($$)) 
     14        mkdir -p $RUN_D 
     15        PID=`pidof $BIN` 
     16        echo ${PID%$$} > $PID_F 
     17 
     18 
    919} 
    1020 
Note: See TracChangeset for help on using the changeset viewer.