| Summary: | net-misc/sslh - SSLH init script successfully starts daemon but thinks it's failed | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Jamie Furtner <jamie> |
| Component: | Current packages | Assignee: | Michael Palimaka (kensington) <kensington> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | Keywords: | PATCH |
| Priority: | Normal | ||
| Version: | unspecified | ||
| Hardware: | AMD64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
| Attachments: |
diff file for sslh init script
emerge --info sslh /etc/init.d/sslh diff |
||
Thanks for the report and patch. I'm keen to fix the issue, but unfortunately I cannot reproduce locally, and would like to avoid --wait if at all possible. To that end, could you please attach the output of emerge --info sslh ? Does the extra --pidfile argument solve the problem, or does only --wait fix it for you? Created attachment 317930 [details]
emerge --info sslh
I never thought to try just passing --pidfile to start-stop-daemon. I've tried it and it works correctly. I'll update the patch in a moment. Created attachment 317932 [details, diff]
/etc/init.d/sslh diff
Thanks! This is now fixed in CVS, please reopen if you have further issues. + 11 Jul 2012; Michael Palimaka <kensington@gentoo.org> +sslh-1.13-r1.ebuild, + -sslh-1.13.ebuild, files/sslh.init.d-2: + Revision bump to fix issue with init script where the daemon is successfully + started, but is reported as failed. Thanks to Jamie Furtner <jamie@furtner.ca> + for the patch. |
Created attachment 317858 [details, diff] diff file for sslh init script SSLH init script successfully starts daemon but thinks it's failed. Startup: jfurtner@nemesis /etc/init.d $ sudo /etc/init.d/sslh start * Caching service dependencies ... [ ok ] * Starting sslh ... * start-stop-daemon: /usr/bin/sslh died [ !! ] * ERROR: sslh failed to start jfurtner@nemesis /etc/init.d $ ps -ef | grep sslh nobody 13097 1 0 15:00 ? 00:00:00 /usr/bin/sslh --listen 0.0.0.0 442 --ssh localhost 22 --ssl localhost 441 --openvpn localhost 1194 --user nobody --pidfile /var/run/sslh.pid jfurtner 13174 21599 0 15:00 pts/2 00:00:00 grep --colour=auto sslh jfurtner@nemesis /etc/init.d $ sudo grep sslh- /var/log/secure | tail -n1 Jul 10 15:00:30 nemesis sslh[13097]: sslh-select v1.13b started SSLH was successfully started but start-stop-daemon thinks it died. Apply the attached patch which tells start-stop-daemon to wait for one second and then look for the PID file. jfurtner@nemesis /etc/init.d $ sudo ./sslh start * Caching service dependencies ... [ ok ] * Starting sslh ... [ ok ] jfurtner@nemesis /etc/init.d $ sudo ps -ef | grep sslh nobody 18456 1 0 15:03 ? 00:00:00 /usr/bin/sslh --listen 0.0.0.0 442 --ssh localhost 22 --ssl localhost 441 --openvpn localhost 1194 --user nobody --pidfile /var/run/sslh.pid jfurtner 18567 21599 0 15:03 pts/2 00:00:00 grep --colour=auto sslh jfurtner@nemesis /etc/init.d $ sudo grep sslh- /var/log/secure | tail -n1 Jul 10 15:03:48 nemesis sslh[18456]: sslh-select v1.13b started The patch works if /usr/bin/sslh softlink is pointing at /usr/bin/sslh-fork or /usr/bin/sslh-select.