Updating my NUC from 6.0.3 to LE

  • Sure.


    Code
    # cat /storage/.config/fuckme.sh 
    #!/bin/sh
    
    
    /usr/bin/ssh -i /storage/.ssh/id_rsa 192.168.178.43 /sbin/poweroff


    This script works perfectly when i ran it from the shell.

    • Official Post

    I don't have any idea anymore. If the fuckme.sh script works fine and we know that shutdown.sh is called from inside LE, and fuckme.sh is called while you call shutdown.sh manually from command line, I'm absolutely out of ideas why it shouldn't work.

    Here is someone with more sh foo needed.

    Sorry, I can't help anymore.

    Any reasond you don't put that command directly to the shutdown.sh? So it might look like this:

  • Two possible reasons, though I don't have tested them so far:

    1. The network connection could be shutdown before the shutdown.sh is called.
    2. The process running the shutdown.sh, is killed before the script is completely executed.

    Is there anything in the logs from the NAS? Does it show an SSH connection attempt?
    Try to ping the NAS from your custom script and log the output to a file, this should show whether the network is still up or not.

  • That test won't be conclusive, because opening a SSH connection with public key authorization takes quite a bit longer than writing a few bytes of text onto the sdcard/ssd, and it takes even longer when the SSH daemon on the NAS performs DNS lookups for connecting clients. That's why I asked whether the logs from the NAS are showing incomplete/failed connection attempts.

    Edit, in reference to my earlier post here change your script this way, and we also want stderr logged too:

    Bash
    #!/bin/sh
    /bin/ping -c4 192.168.178.43 1> /storage/test.txt 2>&1

    Edited once, last by Grimson (April 8, 2016 at 3:35 PM).

  • The issue is that the network is going down before your command can complete. This was working before with OE 6.0.3 right? If so I would test the beta of OE7 and see if you still get the issue, I am guessing that it's the bump in systemd version that's maybe causing the issue

    Sent from my Nexus 6 using Tapatalk

    Edited once, last by MikeBuzz (April 9, 2016 at 6:56 AM).


  • The issue is that the network is going down before your command can complete. This was working before with OE 6.0.3 right? If so I would test the beta of OE7 and see if you still get the issue, I am guessing that it's the bump in systemd version that's maybe causing the issue

    Sent from my Nexus 6 using Tapatalk

    Ok, i have tested with the following in shutdown.sh

    /bin/ping -c10 192.168.6.1 1> /storage/test.txt 2>&1


    on OE 6.0.3 i get 10 ping responses recorded as sucessful

    on LE 7 i get 1 response and the rest time out

    PING 192.168.6.1 (192.168.6.1): 56 data bytes
    64 bytes from 192.168.6.1: seq=0 ttl=64 time=1.963 ms
    ping: sendto: Network is unreachable

    So it would seem that in OE6 its waiting for the shutdown to complete before disabling networking but LE7 this is disabled straight away
    [hr]
    Think this tread needs to be moved to General Support :)

    Edited once, last by CvH (April 10, 2016 at 2:09 PM).

  • Thats my guess too. I have put the command into the shutdown.sh directly, and had aneye on the auth.log when shutting down. There is no ssh connection attempt. So i think the shutdown.sh is executed too late from systemD or it´s misconfigured.

    I had some troubles with that before at work in a completely different situation. Does anyone know where the script is being executed from systemD?