Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 382975 - net-misc/openssh - sshd.rc6.3 - "reload" option seems to work only once
Summary: net-misc/openssh - sshd.rc6.3 - "reload" option seems to work only once
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-14 16:35 UTC by Lars Wendler (Polynomial-C) (RETIRED)
Modified: 2011-09-14 21:47 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
sshd.rc6.3.diff (sshd.rc6.3.diff,312 bytes, patch)
2011-09-14 16:35 UTC, Lars Wendler (Polynomial-C) (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2011-09-14 16:35:12 UTC
Created attachment 286447 [details, diff]
sshd.rc6.3.diff

Hi,

with the sshd.rc6.3 init script the reload option doesn't work reliable anymore:


shanghai:~ # /etc/init.d/sshd start
 * Starting sshd ...                                                      [ ok ]
shanghai:~ # cat /var/run/sshd.pid 
29018
shanghai:~ # /etc/init.d/sshd reload
 * Reloading sshd ...                                                     [ ok ]
shanghai:~ # cat /var/run/sshd.pid 
cat: /var/run/sshd.pid: No such file or directory
shanghai:~ # /etc/init.d/sshd reload
 * Reloading sshd ...
 * start-stop-daemon: fopen `/var/run/sshd.pid': No such file or director [ ok ]
shanghai:~ # killall -HUP sshd
shanghai:~ # cat /var/run/sshd.pid 
29069
shanghai:~ # /etc/init.d/sshd reload
 * Reloading sshd ...                                                     [ ok ]
shanghai:~ # /etc/init.d/sshd reload
 * Reloading sshd ...
 * start-stop-daemon: fopen `/var/run/sshd.pid': No such file or director [ ok ]
shanghai:~ # cat /var/run/sshd.pid 
cat: /var/run/sshd.pid: No such file or directory
shanghai:~ # killall -HUP sshd
shanghai:~ # cat /var/run/sshd.pid 
29152
shanghai:~ #

As you can see, the reload script seems to do something but not sending the SIGHUP to sshd.
I've looked into the sshd.rc6.3 init script and found the "--stop" option being the problem here. Removing that option from the init script's reload function makes sshd behave as expected on reload.
Please find attached a working fix.
Comment 1 SpanKY gentoo-dev 2011-09-14 20:38:29 UTC
feel free to commit w/out revbump for now (while we sort out the other init.d issues)
Comment 2 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2011-09-14 21:47:13 UTC
+*openssh-5.9_p1-r2 (14 Sep 2011)
+*openssh-5.8_p2-r1 (14 Sep 2011)
+
+  14 Sep 2011; Lars Wendler <polynomial-c@gentoo.org>
+  +openssh-5.8_p2-r1.ebuild, -openssh-5.9_p1-r1.ebuild,
+  +openssh-5.9_p1-r2.ebuild, files/sshd.rc6.3:
+  non-maintainer commit: Replaced deprecated opts variable (bug #382227) and
+  removed --stop option from reload function (bug #382975). Bot changes and
+  revbumps were done with kind permission from vapier.
+