2 Replies Latest reply on Dec 30, 2014 8:20 PM by TXBDan

    Yocto: How to run daemon on startup? No init.d, etc

    TXBDan

      Hello all,

       

      I'm not very familiar with Yocto and am more familiar with the debian flavors, etc. It's a long story, but in attempt to get a PS3 controller connected, I had to build new BlueZ bluetooth modules. I have everything built, but i can not start the daemon. It installed to /usr/local/libexec/bluetooth/ and is called bluetoothd.

       

      A) How do i simply start the daemon manually?

       

      B) How do i get it to run automatically at boot? I tried creating a init.d directory inside of /etc. Will Yocto look here for startup scripts? I attempted to make a script based on some internet posting, but it won't run due to some missing libraries. The script is:

       

      #!/bin/sh 
      . /lib/lsb/init-functions 
      case "${1}" in 
           start) 
                start-stop-daemon --start --background --exec /usr/libexec/bluetooth/bluetoothd 
                ;; 
      
      
           stop) 
                start-stop-daemon --stop --background --exec /usr/libexec/bluetooth/bluetoothd 
                ;; 
      
      
           restart) 
                ${0} stop sleep 1 ${0} start ;; *) echo "Usage: ${0} {start|stop|restart}" exit 1 ;; esac exit 0