(Resending, used the wrong email before. Again. -_-' ) On 6 August 2013 16:18, Fons Adriaensen wrote:
What difference should the '&& exit' make ? The ssh will terminate anyway when poweroff returns. Problem is that by then it's too late.
I think the fundamental problem is that you just can't expect 'systemctl poweroff' or whatever variation of it, to return and still have a clean system at that point.
How about something like 'shutdown -t 5'? I know if I put that into an SSH session manually, it'll print me a wall message and then I have some time to hit CTRL-D (or exit if I'm quick), so why would an automated command not be able to do the same? For this reason I believe the above, plus the '&& exit' might actually work. The command will return, the wall message will print (obviously we won't see that) and then the exit will happen, before the system actually tries to shutdown. I don't have a box handy to test with as I write this though, sorry. -- *:wq!*