Results 1 to 12 of 12
  1.    #1  
    Hi all!

    Is there a linux-side script that gets called, or something that I can look for that gets called when luna is restarted?

    I want to run some linux scripts when that happens. Re-loading my custom text-edit-autoreplace from /media/internal, for example:
    Code:
    sed -i -e '/^START/,/^END/ d' $AUTOREPLACE
    cat <<EOF >>$AUTOREPLACE                  
    START|START                               
    `cat $MEDIA/text-edit-autoreplace`        
    END|END                                   
    EOF
    Possible? If so, that would make my life a lot easier! Sucks we can't symlink from within vfat, or I'd be able to just edit the file directly.
    Last edited by knobbysideup; 07/15/2010 at 05:31 PM.
    : (){:|:&};:
  2.    #2  
    Selfish Bump
    : (){:|:&};:
  3. #3  
    What exactly are you trying to accomplish?

    -Eric G

    WebOS Internals Developer.
    Follow me on Twitter for updates to my projects: | Virtual Keyboard | wIRC | SuperTux | AUPT | KeyBoss | freeTether |

    Donate
  4.    #4  
    Quote Originally Posted by egaudet View Post
    What exactly are you trying to accomplish?
    If there is a standard script in webos that is called when luna restarts, I'd like to take advantage of it. Similar to /etc/pmnetconfig/if-{up,down} scripts for networking.
    : (){:|:&};:
  5. #5  
    My opensource SysToolsMgr service supports luna restarts: systoolsmgr-service - Project Hosting on Google Code

    If you're looking to do it via commandline or sh script, you can just do:
    Code:
    /usr/bin/killall -HUP LunaSysMgr
    If you've liked my software, please consider to towards future development.

    Developer of many apps such as: WebOS Quick Install, WebOS Theme Builder, Ipk Packager, Unified Diff Creator, Internalz Pro, ComicShelf HD, LED Torch, over 70 patches and more.

    @JayCanuck @CanuckCoding Facebook
  6. #6  
    Quote Originally Posted by knobbysideup View Post
    If there is a standard script in webos that is called when luna restarts, I'd like to take advantage of it. Similar to /etc/pmnetconfig/if-{up,down} scripts for networking.
    What do you need to happen every time luna starts (as opposed to everytime the device starts) ?

    -Eric G

    WebOS Internals Developer.
    Follow me on Twitter for updates to my projects: | Virtual Keyboard | wIRC | SuperTux | AUPT | KeyBoss | freeTether |

    Donate
  7.    #7  
    Quote Originally Posted by egaudet View Post
    What do you need to happen every time luna starts (as opposed to everytime the device starts) ?
    Some way within the underlying OS to see that restart has ocurred. I guess I could write a watchdog on the pid, but that's really kludgy and a waste of resources for what I want to do if there's something luna does to yell at other process "Hey, I just restarted"
    : (){:|:&};:
  8.    #8  
    Quote Originally Posted by Jason Robitaille View Post
    My opensource SysToolsMgr service supports luna restarts: systoolsmgr-service - Project Hosting on Google Code

    If you're looking to do it via commandline or sh script, you can just do:
    Code:
    /usr/bin/killall -HUP LunaSysMgr
    That's not what I'm looking for, Jason. See post above.
    : (){:|:&};:
  9. #9  
    Quote Originally Posted by knobbysideup View Post
    Some way within the underlying OS to see that restart has ocurred. I guess I could write a watchdog on the pid, but that's really kludgy and a waste of resources for what I want to do if there's something luna does to yell at other process "Hey, I just restarted"
    Maybe I'm asking the question wrong. What is it that you intend to trigger to happen every time luna starts?

    -Eric G

    WebOS Internals Developer.
    Follow me on Twitter for updates to my projects: | Virtual Keyboard | wIRC | SuperTux | AUPT | KeyBoss | freeTether |

    Donate
  10.    #10  
    Quote Originally Posted by egaudet View Post
    Maybe I'm asking the question wrong. What is it that you intend to trigger to happen every time luna starts?
    Is there a script somewhere in the base OS that gets run when luna restarts? If not, I can instead write my own watchdog init script, but I was trying to avoid that.

    Totally unrelated:
    If I were to wrap this up into a patch, can a patch include files that don't already exist in the base OS, or can it only incorporate diff changes? If the latter, I guess I would just make a regular package.
    : (){:|:&};:
  11. #11  
    Quote Originally Posted by knobbysideup View Post
    Is there a script somewhere in the base OS that gets run when luna restarts? If not, I can instead write my own watchdog init script, but I was trying to avoid that.
    I don't know of any scripts that only Luna runs but what are you trying to accomplish? What is different in the system when you restart Luna that you need to continue to re-run on every Luna start vs. every device start?

    Totally unrelated:
    If I were to wrap this up into a patch, can a patch include files that don't already exist in the base OS, or can it only incorporate diff changes? If the latter, I guess I would just make a regular package.
    It can create files yes (-N option to diff utility)

    -Eric G

    WebOS Internals Developer.
    Follow me on Twitter for updates to my projects: | Virtual Keyboard | wIRC | SuperTux | AUPT | KeyBoss | freeTether |

    Donate
  12.    #12  
    Quote Originally Posted by egaudet View Post
    I don't know of any scripts that only Luna runs but what are you trying to accomplish? What is different in the system when you restart Luna that you need to continue to re-run on every Luna start vs. every device start?
    Changes to the autoreplace dictionary do not take effect until after a luna restart. Hrm. You just woke me up, lol. If I run the thing after that, it wouldn't be effective anyway. Ok, I'm stupid, ignore this entire thread, lol!

    I'll figure out a good method and maybe turn it into my first patch for the community. It shouldn't be too difficult now that I no longer am going to bother with making the whole re-read of the autoreplace seamless.

    Thanks for taking the time to try to answer my questions!
    : (){:|:&};:

Posting Permissions