Need a script executed whenever OS wants data from internet

Discussion in 'Bugless' started by rancur3p1c, Jan 2, 2011.

  1. rancur3p1c
    Offline

    rancur3p1c Member

    Joined:
    Jun 30, 2010
    Messages:
    66
    Likes Received:
    0
    Trophy Points:
    6
    Ratings:
    +0
    For Cricket and MetroPCS users, we have a script that runs some iptables forwarding commands and then proxies them through an ARM compiled U2NL binary. U2nl is a linux proxying app.

    The problem we have is that after the OS wants more RAM, it starts killing processes with low and old PIDs. So U2nl usually gets killed.

    We appear to have come up with a fix in this thread:
    Metro Proxy U2NL Fix

    However I am not aware of where to do this for BB.

    I very much like BB and would like to get this working on BB so I don't have to run off to CM or anything. Apart from installing a Swap (which I'll be doing anyways-- but I don't want our solution to rely on this because not all users can trundle through the difficulty of setting up their own swap partition), what options do I have?

    Can anyone tell me under which init scripts I could put "/data/opt/autostart.sh START" to accomplish what we need? I just looked through all my init scripts, can't find any that seem to run when the OS needs internet data. Please help.
     
  2. rancur3p1c
    Offline

    rancur3p1c Member

    Joined:
    Jun 30, 2010
    Messages:
    66
    Likes Received:
    0
    Trophy Points:
    6
    Ratings:
    +0
    bueler?
    10chars
     
  3. sylentprofet
    Offline

    sylentprofet New Member

    Joined:
    Feb 25, 2010
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    California, USA
    Ratings:
    +0
    fry? ... fry?