summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Harpin <development@landsofshadow.co.uk>2015-01-24 20:33:40 +0000
committerAlex Harpin <development@landsofshadow.co.uk>2015-01-24 20:33:40 +0000
commitc2ca8e98c46975a7aa33cf0f07ae55a878c393ad (patch)
tree3fa612c9378af3fb43f04b385e1ee07954a36a65
parent119a0b0d12dea51d1a5032552dbe8944308276ca (diff)
downloadvyatta-op-c2ca8e98c46975a7aa33cf0f07ae55a878c393ad.tar.gz
vyatta-op-c2ca8e98c46975a7aa33cf0f07ae55a878c393ad.zip
vyatta-op: final fix for the ssh client failing to disconnect on reboot
Final fix to ensure that any SSH clients are sent the disconnect signal on a scheduled reboot as well as a 'reboot now'. Bug #298 http://bugzilla.vyos.net/show_bug.cgi?id=298
-rwxr-xr-xscripts/vyatta-reboot.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/vyatta-reboot.pl b/scripts/vyatta-reboot.pl
index bec4ebd..860e3da 100755
--- a/scripts/vyatta-reboot.pl
+++ b/scripts/vyatta-reboot.pl
@@ -159,13 +159,13 @@ if ($action eq "reboot_at") {
print "\nReload scheduled for $time\n\n";
if (!defined($ENV{VYATTA_PROCESS_CLIENT}) || $ENV{VYATTA_PROCESS_CLIENT} ne 'gui2_rest') {
- if (! prompt("Proceed with reboot schedule? [confirm]", -y1d=>"y")) {
+ if (! prompt("Proceed with reboot schedule? [confirm] ", -y1d=>"y")) {
print "Reboot canceled\n";
exit 1;
}
}
- @lines = `echo sudo /sbin/reboot | at $at_time 2>&1`;
+ @lines = `echo "sudo /sbin/reboot && sudo /usr/bin/killall sshd" | at $at_time 2>&1`;
($err, $job, $time) = parse_at_output(@lines);
if ($err) {
print "Error: unable to schedule reboot\n";