Results 1 to 10 of 10
  1.    #1  
    How to auto run luna-send command on boot?
    I tried running a luna-send command in /etc/rc?.d but it didn't work after reboot.
    Last edited by hotren; 05/13/2012 at 04:01 AM.
  2.    #2  
    why the following code can't create a '/etc/test.log' file on boot?

    /etc/init.d/test.sh
    #!/bin/sh
    echo `date` > /etc/test.log

    ln -s /etc/init.d/test.sh /etc/rc2.d/S80test.sh
    ln -s /etc/init.d/test.sh /etc/rcS.d/S80test.sh
  3. #3  
    Cause /etc is not writable?

    -- Rod
    WebOS Internals and Preware Founder and Developer
    You may wish to donate by Paypal to donations @ webos-internals.org if you find our work useful.
    All donations go back into development.
    www.webos-internals.org twitter.com/webosinternals facebook.com/webosinternals
  4.    #4  
    Quote Originally Posted by rwhitby View Post
    Cause /etc is not writable?

    -- Rod
    thank you. the permissions of the /etc is 755, and output it to /tmp is the same.
  5. #5  
    Quote Originally Posted by hotren View Post
    thank you. the permissions of the /etc is 755, and output it to /tmp is the same.
    The permissions of /etc may be 755, but it's on a partition which is mounted read-only.

    -- Rod
    WebOS Internals and Preware Founder and Developer
    You may wish to donate by Paypal to donations @ webos-internals.org if you find our work useful.
    All donations go back into development.
    www.webos-internals.org twitter.com/webosinternals facebook.com/webosinternals
  6.    #6  
    Quote Originally Posted by rwhitby View Post
    The permissions of /etc may be 755, but it's on a partition which is mounted read-only.

    -- Rod
    may be is the partiton mounted read-only, thank you.
    I found the webOS replaced the init daemon with the upstart daemon, then you can autorun the applications with it on boot.
    for example:
    $ cat /etc/event.d/test
    start on started LunaReady
    script
    luna-send -n 1 palm://com.palm.wifi/setstate '{"state": "enabled"}'
    luna-send -n 1 palm://com.palm.applicationManager/launch '{"id": "com.palm.app.email"}'
    end script

    but, I found the webOS upstart daemon don't support the If---fi condition syntax.
    for example:
    1. don't work
    $ cat /etc/event.d/test1
    start on started LunaReady
    script
    if [ 1 -eq 1 ]; then
    luna-send -n 1 palm://com.palm.wifi/setstate '{"state": "enabled"}'
    luna-send -n 1 palm://com.palm.applicationManager/launch '{"id": "com.palm.app.email"}'
    fi
    end script
    2. work right
    $ cat /etc/event.d/test2
    start on started LunaReady
    script
    # if [ 1 -eq 1 ]; then
    luna-send -n 1 palm://com.palm.wifi/setstate '{"state": "enabled"}'
    luna-send -n 1 palm://com.palm.applicationManager/launch '{"id": "com.palm.app.email"}'
    # fi
    end script
    3. open the wifi is work right, but can't run the email
    $ cat /etc/event.d/test3
    start on started LunaReady
    script
    luna-send -n 1 palm://com.palm.wifi/setstate '{"state": "enabled"}'
    if [ 1 -eq 1 ]; then
    luna-send -n 1 palm://com.palm.applicationManager/launch '{"id": "com.palm.app.email"}'
    fi
    end script
    4. don't work both
    $ cat /etc/event.d/test4
    start on started LunaReady
    script
    if [ 1 -eq 1 ]; then
    luna-send -n 1 palm://com.palm.wifi/setstate '{"state": "enabled"}'
    fi
    luna-send -n 1 palm://com.palm.applicationManager/launch '{"id": "com.palm.app.email"}'
    end script

    why? who can tell me, thank you very much.
  7.    #7  
    I found the webOS replaced the init daemon with the upstart daemon, then you can autorun the applications with it on boot.
    for example:
    $ cat /etc/event.d/test
    start on started LunaReady
    script
    luna-send -n 1 palm://com.palm.wifi/setstate '{"state": "enabled"}'
    luna-send -n 1 palm://com.palm.applicationManager/launch '{"id": "com.palm.app.email"}'
    end script

    but, I found the webOS upstart daemon don't support the If---fi condition syntax.
    for example:
    1. don't work
    $ cat /etc/event.d/test1
    start on started LunaReady
    script
    if [ 1 -eq 1 ]; then
    luna-send -n 1 palm://com.palm.wifi/setstate '{"state": "enabled"}'
    luna-send -n 1 palm://com.palm.applicationManager/launch '{"id": "com.palm.app.email"}'
    fi
    end script
    2. work right
    $ cat /etc/event.d/test2
    start on started LunaReady
    script
    # if [ 1 -eq 1 ]; then
    luna-send -n 1 palm://com.palm.wifi/setstate '{"state": "enabled"}'
    luna-send -n 1 palm://com.palm.applicationManager/launch '{"id": "com.palm.app.email"}'
    # fi
    end script
    3. open the wifi is work right, but can't run the email
    $ cat /etc/event.d/test3
    start on started LunaReady
    script
    luna-send -n 1 palm://com.palm.wifi/setstate '{"state": "enabled"}'
    if [ 1 -eq 1 ]; then
    luna-send -n 1 palm://com.palm.applicationManager/launch '{"id": "com.palm.app.email"}'
    fi
    end script
    4. don't work both
    $ cat /etc/event.d/test4
    start on started LunaReady
    script
    if [ 1 -eq 1 ]; then
    luna-send -n 1 palm://com.palm.wifi/setstate '{"state": "enabled"}'
    fi
    luna-send -n 1 palm://com.palm.applicationManager/launch '{"id": "com.palm.app.email"}'
    end script

    why? who can tell me, thank you very much.
  8.    #8  
    Solved.
    script is no problem, Is the file format problems caused by the Internalz Pro editor.
  9.    #9  
    Solved.
    script is no problem, Is the file format problems caused by the Internalz Pro editor.
  10. #10  
    <threads merged>

Tags for this Thread

Posting Permissions