From a541f066264c8a238f0c1aadf3e64e651c22e219 Mon Sep 17 00:00:00 2001 From: Alex Harpin Date: Thu, 1 Jan 2015 11:54:22 +0000 Subject: vyatta-op: on shutdown/reboot the client ssh session doesn't disconnect When either the reboot or poweroff commands are issued from the CLI, any ssh clients currently connected to the system aren't disconnected correctly, having to rely on a timeout to terminate them. The sendsigs process doesn't fully close sshd before the network is taken down, with the result that the client don't receive the disconnect signal. Bug #298 http://bugzilla.vyos.net/show_bug.cgi?id=298 --- templates/poweroff/node.def | 4 ++-- templates/poweroff/now/node.def | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'templates') diff --git a/templates/poweroff/node.def b/templates/poweroff/node.def index b3a41f1..44b8301 100644 --- a/templates/poweroff/node.def +++ b/templates/poweroff/node.def @@ -1,9 +1,9 @@ help: Poweroff the system run: if [ "$VYATTA_PROCESS_CLIENT" == "gui2_rest" ] then - sudo /sbin/shutdown -h now + sudo /sbin/shutdown -h now && sudo /usr/bin/killall sshd else ${vyatta_bindir}/yesno -n "Proceed with poweroff? (Yes/No) [No] " \ - && sudo /sbin/shutdown -h now + && sudo /sbin/shutdown -h now && sudo /usr/bin/killall sshd fi diff --git a/templates/poweroff/now/node.def b/templates/poweroff/now/node.def index 1117668..d9902cb 100644 --- a/templates/poweroff/now/node.def +++ b/templates/poweroff/now/node.def @@ -1,3 +1,3 @@ help: Poweroff the system now [disruptive] -run: sudo /sbin/shutdown -h now +run: sudo /sbin/shutdown -h now && sudo /usr/bin/killall sshd -- cgit v1.2.3