Posts by nrand

    If you had to change two line I have a different solution, which is more compatible with older scripts it turns out.

    Remove the previous fixes and change the following in /usr/sbin/autoshutdown, line 1151.

    From: '$1 ~ regex && !/SLAVE/ {print $1}')
    To: '$1 ~ regex && !/SLAVE/{sub(/@.*/,"",$1); print $1}')

    The script the will now dropped the '@<interface_name>' from the network interface identification throughout the script. For example: 'eth0.42@eth0' would know as 'eth0.42'. This is similar to what it used to do I think. Can you give it a try and double check it form me. If this is good I will get the release out with the fix.

    Thanks again for doing this for me

    Hi systemd would have triggered the restart and the script was trying to check if the interface will get assigned (it has a 60 second timeout). What you are seeing in new behaviour as of v5.1.11. The new behaviour is to fix the restart from suspend and hibernate when using DHCP (and is similar to that of the 4.X version of the script). You can optimise this behaviour using the FORCE_NIC setting (see /etc/autoshutdown.default for more details).

    So I am assuming the script started up and ran autoshutdown (even if a bit slower to start)? Can you confirm it is now working, then i add the fix the a new release. Thanks you for checking this for me

    Hi sorry did not see this till now. I think this is easily fixed please do the following:

    Change the following in /usr/sbin/autoshutdown, line 1126.

    From: local state; state="$(< "/sys/class/net/${net_iface}/operstate")"
    To: local state; state="$(< "/sys/class/net/${net_iface%@*}/operstate")"

    Please let me now if this work for you and if it does I will place the fix in the 5.1.12 release.

    if it does not work I need a bit more info to fix it (hopefully this will not be required). let me know how you get on :)

    Ok here a fix you can apply to 5.1.11 (released today) until the fix is release and it give it a bit of testing.

    Change the following in /usr/sbin/autoshutdown, line 83

    From: local -r server_ips="${3// /\\|}"
    To: local -r server_ips="^\(${3// /\\|}\)$"

    This should fix it for you. can you confirm if it worked for you or not.

    aha SHUTDOWNCOMMAND="pm-suspend" the script has fully moved to systemd ether set "Suspend" in the GUI or set SHUTDOWNCOMMAND="systemctl suspend". There been a lot of changes to the script and the GUI most setting can be set in the GUI now.

    Hibernate should be similar 'systemctl hibernate' or "hibernate" in the GUI. there still a few issue to fix in the next release

    I wait for you to confirm you are working before I release all the fixed.

    Note: hybrid-sleep (Hybrid in GUI) need a fix in the next release also.

    _ping_range(): pinglist_array:'

    it worked for me , so I will need the logs

    hmm this dose not entirely make sense to me but i have issue with NVidia driver before. I do not think this is an interaction between the scrip however it look more like it an NVidia issue directly. However it look as it we have reached a solution that work so that all good.

    I will go about cleaning up the change and getting it ready for a proper release as the script as it is is a bit of a hack to test everting will work. FYI it will not support DHCP addresses no need for static addresses. So this change will form par of the 5.1.11. @Dagobert57 i will also fix the hybrid-sleep issues which is suspect has always been incorrect.

    Let me know if there is anything else (raise a issue in GItHub if you need or spot a problem I will address this ASAP)

    So I will assume this is resolved for now :)

    Ok from the log is look as it the autoshutdown-restart script is not working at all. I would remove any version of this file that you can find on the system and make sure you reinstall autoshutdown from a fresh (as it was working before). The reason I say this is in the log provided there is not entry in the log from the script firing.

    It you what yo make sure you are back as the 5.1.10 autoshutdown, you should back-up you autoshutdown settings. purge the package using apt purge (not you will loss you setting so make sure you backed them up) and reinstall. Mind I am assuming you have not done the above before hand.

    Once installed make sure that autoshutdown-restart is executable and located at /lib/systemd/system-sleep/. Re-apply you autoshutdown setting. To test the scrip work you do not have to have autoshutdown turn of the server. The script should run and log into /var/log/autoshutdown.log that is closed autoshutdown and restarted it after suspend. Something like:

    INFO: 'autoshutdown-restart(): Autoshutdown stopping' - at suspend

    and on restart:

    INFO: 'autoshutdown-restart(): Autoshutdown starting' - at resume

    if these log entry are not there then there is a system issue. Hope that helps

    Ok I have got a working solution, to test first re-install the plugin so we start from a clean position, then:

    chmod +x autoshutdown
    sudo mv /usr/sbin/autoshutdown /usr/sbin/autoshutdown.orig
    sudo cp autoshutdown /usr/sbin/autoshutdown
    sudo systemctl restart autoshutdown.service

    This script will force VERBOSE mode just in case we need the logs.

    Once tested move the orig if required:

    sudo mv /usr/sbin/autoshutdown.orig /usr/sbin/autoshutdown

    Hope this work for you.

    hi, well i found a problem with the fix also so I am going to have to re-think this. I suspect your using DHCP and the lease expired on the ip or something similar. The timing issues is hard to fix across a set of network devices as I can brick the current fix in a few ways so it not robust. If I make it robust the scrip will take a long time to come online. However it would be no worst then the original i guess. give me a bit to think and see if i can find a better solution.

    Hi can you check that yuo have execution right on both /usr/sbin/autoshutdown and /lib/systemd/system-sleep/autoshutdown-restart

    if not:

    sudo chmod +x /usr/sbin/autoshutdown
    sudo chmod +x /lib/systemd/system-sleep/autoshutdown-restart

    Make sure /lib/systemd/system-sleep/autoshutdown-restart also has the correct content i.e. as when downloaded with the wget

    If this above does not fix the issue I will need the verbose log form the new script.

    Note: If there is no log at all something else is up check - sudo journalctl -u autoshutdown.service

    Ok, well I think this showed what I needed it needed a delay to allow the service to restart. I now think i have a fix. Yo need to remove the sleep code from autoshutdown-restart. To get the original version of the file do the following:

    sudo cp autoshutdown-restart /lib/autoshutdown-restart

    To test the fix, we use a similar method to above:

    sudo cp autoshutdown /usr/sbin/autoshutdown
    sudo systemctl restart autoshutdown.service

    After testing to go back to original:

    sudo cp autoshutdown /usr/sbin/autoshutdown
    sudo systemctl restart autoshutdown.service

    Let me now how you get on :) if this work I will commit all the bit and clean it up a little

    hi, it possible to try this form me. I hope it will fix the suspend issues.

    Do the following:

    $ sudo vi /lib/systemd/system-sleep/autoshutdown-restart

    Change the post as follows:

    13 post)
    14         ( sleep 30 &&
    15 if systemctl is-enabled --quiet autoshutdown.service &&
    16 ! systemctl is-active --quiet autoshutdown.service; then
    17     systemctl --no-block start autoshutdown.service
    18 logger -t "autoshutdown[${$}]" -p "" \
    19     "${USER}: INFO: 'autoshutdown-restart(): Autoshutdown starting'"
    20  fi ) &
    21 ;;

    $ sudo systemctl daemon-reload

    Then see if this work. It should delay the restart of the service.

    Please let me know if this works