Updating my NUC from 6.0.3 to LE

  • Hello guys,

    i have just found out about LE and as i am an ealry adopter sometimes and i like your concept i thought about switching from OE to LE.

    So long story short, it worked fine so far.

    I have just put the update file into the update folder did a reboot and tadaa. It looks good, no bugs from my side so far.

    Can´t wait to see Kodi 17 with the new Skin on LE running.

    Thanks a lot!

  • Thanks, you won't see Kodi 17 just yet. But I think milhouse is preparing to start doing community builds with kodi 17 in the very near future. So look out and you might stumble upon devel builds sooner rather then later.

  • Yeah well lets get LE stable and healty first, before we are looking to Kode 17 ;).

    I noticed one bug yesterday evening, the machine won´t shutdown completely. I have a tweaked shutdown script which makes a connection via SSH to my NAS to shut it down too.
    Somehow this won´t work with LE.

    Any idea how this can be? Worked fine under OE of course.

  • Sure. So that was my source Openelec Wiki.
    Logging in happens with SSH-Keys.


    And here is what i made:



    Bash
    #!/bin/bash
    
    
    ssh 192.168.178.43 /sbin/poweroff

    Sorry for the bad words, i was in a bad mood when i´ve done it.
    [hr]
    I have just noticed that the last update to v6.90.003 won´t work. He downloads it and does the reboot, but when it´s rebooting it just don´t install the update. I had to put the update manually at /storage/.update/ and it worked then. Eventhough after the update he won´t power off completely. He stops at "Reached target Shutdown".


  • Update on this script thing.

    It works when i reboot the machine but not on a shutdown. I have no idea why.

    The broken shutdown is still there.

    Try this to determinate what you need to set as the case when you initiate the shutdown (pressing the power off system button)


    Code
    case "$1" in
     *)
       echo "$1" > /storage/shutdown.txt
       ;;
    esac

    If it's empty the shutdown.sh was probably never executed.

    Edited once, last by Ne0 (April 2, 2016 at 1:51 AM).

  • Ok, shall i replace the shutdown.sh with what you have posted completely?

    Edit:
    Ok the shutdown.txt shows "poweroff", the NAS is not shutting down of course, but LE is powering off normally.

    • Official Post

    @ Alternativende:

    The only thing, that confuses me in a bit is that "*" under the 'poweroff' section..

    Code
    ...
    poweroff)
       *
        /storage/.config/fuckme.sh
        ;;


    I would remove that.
    and for the ultimative test, I would change the script to the following:


    and then check /storage/test.txt what's in there. So you will know the "case" will work.

    If you want, you could run that script via command line, as we already know that $1 should be 'poweroff' from your previous test.

    Now we need to know why the 'case' might not work. To get a more verbose output remove the "#" from the '#set -x" line and start the script from command line like:

    Code
    ./storage/shutdown.sh poweroff

    then, normally "poweroff" should be written to /storage/test.txt. You will see a lot of lines at the output of what the script exactly does. That's because of the "set -x" line you activated by removing the "#". And maybe you will see why the script fails. To change this massive output again, just add the "#" again in front of "set -x" or just remove that line completely.

    And just for the cosmetics....LibreELEC, as the same as for OpenELEC, doesn't have bash....it has sh. So the shebang at the fuckme.sh shouldn't be:

    #!/bin/bash

    it should be

    #!/bin/sh

    shouldn't be a big problem. But I would change it, too ;).

    For checking which shell is used, enter: echo $SHELL

    Greetings

  • So im trying right now.

    This

    Code
    ./storage/shutdown.sh poweroff


    actually shuts down the NAS correctly.

    Inserting just your test script to the fuckme.sh results in nothing. No test.txt is created.

    Using your script as shutdown.sh and giving out the command with set -x leads me to a test.txt with just "poweroff" in it.

    Beside´s i have removed the star already with no changes.

  • Some general informations about shell scripts.

    You should never trust that environment variables like "path" are correctly set, always use the full path to a binary, so for example:

    Code
    ssh do_stuff


    is bad.

    Code
    /usr/bin/ssh do_stuff


    is the correct way.

    You seem to be using public key authentification for the connection to your NAS. If yes the above also applies for the certificates, so better specify them with the "-i" parameter, see ssh.

    Edited once, last by Grimson (April 6, 2016 at 7:04 PM).

  • Well that is not the solution to this. I have added the -i /storage/.ssh/id_rsa and the /usr/bin/ssh and changed from bash to sh. Also i have updated LE to 6.9.05, same results. Last message i see is "Reached target shutdown" and that won´t dissappear.