Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    [Solved] dbus-scripts matches but dont execute scripts

    Reply
    stderr | # 1 | 2010-10-19, 08:09 | Report

    Hi folks,

    last night i played a little bit with dbus-settings (from Extra-devel).
    I have wrote some scripts for some events, edited /etc/dbus-scripts.d/dbus-scripts-settings and restarted the daemon.

    After restart i have start another daemon with --debug flag to see what's going on on the dbus ...

    After plugging in the charger i will see
    Code:
    Arg 1: :1.30
    Arg 2: null
    Arg 3: com.nokia.bme.signal
    Arg 4: charger_charging_on
    Script /opt/bin/charging_on matches
    ... but /opt/bin/charging_on don't will be executed.
    At the beginning the script only will echo "charging on" to a file.
    And this does not happen.

    This behavior i can reproduce on all events i have configured.
    The daemon will find his matching script but it will not be executed.

    Hopefully someone can help me.

    Best regards
    Olli

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by stderr; 2010-10-20 at 10:46.

     
    stderr | # 2 | 2010-10-19, 16:43 | Report

    ok ... i have extended $PATH with /opt/bin ... no change.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Matan | # 3 | 2010-10-19, 17:38 | Report

    You should not edit /etc/dbus-scripts.d/dbus-scripts-settings, but create your own file instead. But this has nothing to do with your problem.

    Are the scripts executable? Did you run them from the shell?

    Edit | Forward | Quote | Quick Reply | Thanks

     
    stderr | # 4 | 2010-10-19, 18:13 | Report

    Hi Matan,

    yes ... the scripts are 755 and doing these things i have scripted.


    Code:
    Nokia-N900-02-8:~# cat /tmp/state
    disp on
    disp off
    charge on
    charge off
    key open
    key close
    Code:
    Nokia-N900-02-8:~# display_on
    Nokia-N900-02-8:~# display_off
    Nokia-N900-02-8:~# cat /tmp/state
    disp on
    disp off
    charge on
    charge off
    key open
    key close
    disp on
    disp off
    Code:
    Nokia-N900-02-8:~# cat /usr/local/bin/display_on
    #!/bin/sh
    echo "disp on" >> /tmp/state
    Code:
    Nokia-N900-02-8:~# cat /usr/local/bin/display_off
    #!/bin/sh
    echo "disp off" >> /tmp/state
    Greetings
    Olli

    Edit:
    I've forget
    Code:
    Arg 1: :1.10
    Arg 2: null
    Arg 3: com.nokia.mce.signal
    Arg 4: display_status_ind
    Arg 5: off
    Script display_off matches
    Code:
    Arg 1: :1.10
    Arg 2: null
    Arg 3: com.nokia.mce.signal
    Arg 4: display_status_ind
    Arg 5: on
    Script display_on matches

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by stderr; 2010-10-19 at 18:21.

     
    stderr | # 5 | 2010-10-20, 10:45 | Report

    Ok ... i've solved my problem.

    After added the complete path to the scripts in the configuration the scripts will be executed.

    The mere fact that the files in a folder inside $PATH is not enough for apparently.

    Edit | Forward | Quote | Quick Reply | Thanks

     
vBulletin® Version 3.8.8
Normal Logout