diff options
author | Alex Harpin <development@landsofshadow.co.uk> | 2015-01-24 20:33:40 +0000 |
---|---|---|
committer | Alex Harpin <development@landsofshadow.co.uk> | 2015-02-24 21:50:52 +0000 |
commit | e485f762b1b8ac8c1a2e4cff74c0bc2ce7724afb (patch) | |
tree | 01df86b7f1e5c8e234d21e0b345ff56092bf5453 | |
parent | 5cf3930a0d7155fd7a91ca68eb56d1fa40f093b7 (diff) | |
download | vyatta-op-e485f762b1b8ac8c1a2e4cff74c0bc2ce7724afb.tar.gz vyatta-op-e485f762b1b8ac8c1a2e4cff74c0bc2ce7724afb.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-x | scripts/vyatta-reboot.pl | 4 |
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"; |