View previous topic :: View next topic |
Author |
Message |
DNAspark99 Guru
Joined: 03 Sep 2004 Posts: 321
|
Posted: Fri Mar 08, 2013 10:08 pm Post subject: |
|
|
Sorry, didn't mean to come off indignant or anything - I absolutely appreciate your input on this, the issue needs attention, and you've provided nothing but valuable input!
I'm just updating the thread with feedback as I try out your suggestions. )
Indeed, the following works in all scenarios, and am now using your suggestion in /etc/init.d/sshd, it's quicker, it's cleaner, everything works, everyones happy. Thanks!!
I just hope this fix finds it's way into future gentoo
Code: |
stop() {
if [ "${RC_CMD}" = "restart" ] ; then
checkconfig || return 1
fi
ebegin "Stopping ${SVCNAME}"
start-stop-daemon --stop --exec "${SSHD_BINARY}" \
--pidfile "${SSHD_PIDFILE}" --quiet
eend $?
if [ "${RC_RUNLEVEL}" = "shutdown" ]; then
SSH_CLIENT_PIDS="$(pgrep -f 'sshd:')"
if [[ -n ${SSH_CLIENT_PIDS} ]] ; then
kill -TERM ${SSH_CLIENT_PIDS}
fi
fi
}
|
[SOLVED], 3rd time's the charm! |
|
Back to top |
|
|
m27315 Apprentice
Joined: 10 Dec 2004 Posts: 253 Location: 2 workstations down
|
Posted: Thu May 09, 2013 7:24 pm Post subject: |
|
|
this last solution worked great for me! |
|
Back to top |
|
|
Whissi Retired Dev
Joined: 12 Jan 2011 Posts: 222
|
Posted: Thu Aug 22, 2013 3:55 pm Post subject: |
|
|
Hi,
this thread is marked as "fixed" but it seems like the issue still exists.
openrc-0.12 has landed in tree and should contain a fixed according to William but it looks like, that Gentoo still leaves out connections on shutdown.
From #openrc it seems like I am the only one who is able to reproduce the problem. It would be nice if some of you could test it again (don't forget to deactivate your manually fixes!) and report in https://bugs.gentoo.org/show_bug.cgi?id=259183 if you still see the issue or not.
Thanks! _________________ Regards,
Whissi |
|
Back to top |
|
|
UncleVan n00b
Joined: 08 Feb 2011 Posts: 72
|
Posted: Wed Sep 11, 2013 5:40 pm Post subject: still nops... |
|
|
I found the simplest and most compatible solution so far:
Code: | cat > /etc/local.d/10kill_ssh_session.stop
# To not let ssh/telnet connection(s) hanging on shutdown/reboot
killall ssh sshd telnet telnetd in.telnetd
CTRL-D |
and then
Code: | chmod u+x /etc/local.d/10kill_ssh_session.stop |
/etc/local.d/*.stop scripts are executed on reboot/shutdown.
Try it ! |
|
Back to top |
|
|
yuyuyak n00b
Joined: 23 Nov 2012 Posts: 55 Location: United States
|
Posted: Thu Sep 12, 2013 1:57 am Post subject: |
|
|
Been following this thread for awhile, all contributions, bravo! Used DNAspark99's solution for a month or two, works as advertised.
But I gotta give the gold star to UncleVan's solution, neat, clean, the Gentoo way and most important of all, it works too.
Thanks to all |
|
Back to top |
|
|
DNAspark99 Guru
Joined: 03 Sep 2004 Posts: 321
|
Posted: Thu Nov 07, 2013 9:15 pm Post subject: |
|
|
Fresh install.
It appears this is still an issue. |
|
Back to top |
|
|
|