* [devel] start-stop-daemon (spamassassin bug #28789) @ 2014-06-19 8:41 Sergey Y. Afonin 2014-06-19 9:30 ` Denis G. Samsonenko ` (2 more replies) 0 siblings, 3 replies; 19+ messages in thread From: Sergey Y. Afonin @ 2014-06-19 8:41 UTC (permalink / raw) To: ALT Linux Team development discussions Приветствую. А как start-stop-daemon обрабатывает параметры --name и --exec ? Что с чем сравнивает ? Есть такой вот баг: https://bugzilla.altlinux.org/28789 Вот что получается: # ps ax|grep spamd 16321 ? Ss 0:03 /usr/bin/spamd -d --pidfile=/var/run/spamd.pid 16322 ? S 0:00 spamd child 16323 ? S 0:00 spamd child # cat /var/run/spamd.pid 16321 # start-stop-daemon --stop --name spamd --pidfile /var/run/spamd.pid --user root --test --verbose No spamd found running; none killed. # start-stop-daemon --stop --pidfile /var/run/spamd.pid --user root --test Would send signal 15 to 16321. То есть, если бы в инит-скрипте spamassassin убрать привязку к имени, инит-скрипт начинал бы работать. Однако, попытка убрать у stop_daemon() "--name spamd" автоматом приводит к появлению "--exec /usr/bin/spamd", а так не работает тоже. -- С уважением, Сергей Афонин asy@altlinux.ru ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [devel] start-stop-daemon (spamassassin bug #28789) 2014-06-19 8:41 [devel] start-stop-daemon (spamassassin bug #28789) Sergey Y. Afonin @ 2014-06-19 9:30 ` Denis G. Samsonenko 2014-06-19 9:59 ` Sergey Y. Afonin 2014-06-19 9:33 ` Dmitry V. Levin 2014-06-19 9:36 ` Denis G. Samsonenko 2 siblings, 1 reply; 19+ messages in thread From: Denis G. Samsonenko @ 2014-06-19 9:30 UTC (permalink / raw) To: ALT Linux Team development discussions День добрый! > А как start-stop-daemon обрабатывает параметры --name и --exec ? На сколько я понимаю, spamd -- это perl-скрипт. Недавно столкнулся с проблемой старта-остановки на ddclient, который тоже perl-скрипт. Посмотрите обсуждение тут: http://lists.altlinux.org/pipermail/sisyphus/2014-May/362302.html https://bugzilla.altlinux.org/show_bug.cgi?id=30066 Похоже не вашу проблему? -- Всего доброго, Денис. ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [devel] start-stop-daemon (spamassassin bug #28789) 2014-06-19 9:30 ` Denis G. Samsonenko @ 2014-06-19 9:59 ` Sergey Y. Afonin 2014-06-19 11:56 ` Sergey Y. Afonin 2014-06-20 18:57 ` Led 0 siblings, 2 replies; 19+ messages in thread From: Sergey Y. Afonin @ 2014-06-19 9:59 UTC (permalink / raw) To: ALT Linux Team development discussions On Thursday 19 June 2014, Denis G. Samsonenko wrote: > http://lists.altlinux.org/pipermail/sisyphus/2014-May/362302.html Да, это вот обсуждение рядом. Но у spamd чуть проще: просто пробел попал в конце. Вообще, может, стоит так же и сделать. -- С уважением, Сергей Афонин asy@altlinux.ru ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [devel] start-stop-daemon (spamassassin bug #28789) 2014-06-19 9:59 ` Sergey Y. Afonin @ 2014-06-19 11:56 ` Sergey Y. Afonin 2014-06-20 4:17 ` Eugene Prokopiev 2014-06-20 18:57 ` Led 1 sibling, 1 reply; 19+ messages in thread From: Sergey Y. Afonin @ 2014-06-19 11:56 UTC (permalink / raw) To: ALT Linux Team development discussions On Thursday 19 June 2014, Sergey Y. Afonin wrote: > > http://lists.altlinux.org/pipermail/sisyphus/2014-May/362302.html > > Да, это вот обсуждение рядом. Но у spamd чуть проще: просто > пробел попал в конце. Вообще, может, стоит так же и сделать. Проблема, всё же, осталась. Cейчас получается симлинк exe -> /usr/bin/perl5.18.2, привязываться к которому явно не хорошо. У ddclient точно bin/perl получался ? А как, интересно ? Или это ещё как-то от ядра зависит ? Надо какое-то общее решение для перловых демонов придумывать, что ли... -- С уважением, Сергей Афонин asy@altlinux.ru ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [devel] start-stop-daemon (spamassassin bug #28789) 2014-06-19 11:56 ` Sergey Y. Afonin @ 2014-06-20 4:17 ` Eugene Prokopiev 2014-06-20 6:56 ` Sergey Y. Afonin 0 siblings, 1 reply; 19+ messages in thread From: Eugene Prokopiev @ 2014-06-20 4:17 UTC (permalink / raw) To: ALT Linux Team development discussions 19 июня 2014 г., 15:56 Sergey Y. Afonin написал: > Надо какое-то общее решение для перловых демонов придумывать, > что ли... У меня работает нормально работает starman (хотя есть жалобы - https://bugzilla.altlinux.org/show_bug.cgi?id=27531) и несколько собственных перловых демонов для внутренних задач - но они изначально писались с использованием Net::Server или Proc::Daemon. -- WBR, Eugene Prokopiev ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [devel] start-stop-daemon (spamassassin bug #28789) 2014-06-20 4:17 ` Eugene Prokopiev @ 2014-06-20 6:56 ` Sergey Y. Afonin 0 siblings, 0 replies; 19+ messages in thread From: Sergey Y. Afonin @ 2014-06-20 6:56 UTC (permalink / raw) To: ALT Linux Team development discussions On Friday 20 June 2014, Eugene Prokopiev wrote: > > Надо какое-то общее решение для перловых демонов придумывать, > > что ли... > > У меня работает нормально работает starman (хотя есть жалобы - > https://bugzilla.altlinux.org/show_bug.cgi?id=27531) https://bugzilla.altlinux.org/show_bug.cgi?id=27531#c5 , на сколько понимаю, ещё не реализовано ? Судя по тому, что в мане start-stop-daemon, где --startas имеет комментарий только для --start ? Да и в коде stop_daemon() про check нет ничего... -- С уважением, Сергей Афонин asy@altlinux.ru ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [devel] start-stop-daemon (spamassassin bug #28789) 2014-06-19 9:59 ` Sergey Y. Afonin 2014-06-19 11:56 ` Sergey Y. Afonin @ 2014-06-20 18:57 ` Led 2014-06-21 9:57 ` Sergey Y. Afonin 1 sibling, 1 reply; 19+ messages in thread From: Led @ 2014-06-20 18:57 UTC (permalink / raw) To: ALT Linux Team development discussions 2014-06-19 12:59 GMT+03:00 Sergey Y. Afonin <asy@altlinux.ru>: > On Thursday 19 June 2014, Denis G. Samsonenko wrote: > >> http://lists.altlinux.org/pipermail/sisyphus/2014-May/362302.html > > Да, это вот обсуждение рядом. Но у spamd чуть проще: просто пробел > попал в конце. Вообще, может, стоит так же и сделать. Быстрохак: перенести spamd в /usr/sbin/ (где, наверное, ему и место) и использовать '--name /usr/sbin/spamd'. Понятно, что это не решение, но такая уж специфика перлового $0 (о чём в "perldoc -v '$0'" и говорится). -- Led. ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [devel] start-stop-daemon (spamassassin bug #28789) 2014-06-20 18:57 ` Led @ 2014-06-21 9:57 ` Sergey Y. Afonin 2014-06-21 10:11 ` Sergey Y. Afonin 2014-06-21 17:02 ` Led 0 siblings, 2 replies; 19+ messages in thread From: Sergey Y. Afonin @ 2014-06-21 9:57 UTC (permalink / raw) To: ALT Linux Team development discussions On Friday 20 June 2014, Led wrote: > >> http://lists.altlinux.org/pipermail/sisyphus/2014-May/362302.html > > > > Да, это вот обсуждение рядом. Но у spamd чуть проще: просто пробел > > попал в конце. Вообще, может, стоит так же и сделать. > > Быстрохак: перенести spamd в /usr/sbin/ (где, наверное, ему и место) и > использовать '--name /usr/sbin/spamd'. > Понятно, что это не решение, но такая уж специфика перлового $0 (о чём > в "perldoc -v '$0'" и говорится). А в каких пакетах документация ? Что-то не нахожу, а perldoc ругается: No documentation found for "perlvar". Имеется ввиду, что пробел в конце ? И чем поможет перенос в /usr/sbin ? Там этот пробел пропадёт ? Мне вот подумалось, может, добавить stop_daemon() и т.п. параметр --spacechar ? Тогда можно бы было написать как-то так: stop_daemon --name "/usr/bin/spamd_" --spacechar "_", а перед вызовом start-stop-daemon, соответственно, символы менять на пробелы. -- С уважением, Сергей Афонин ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [devel] start-stop-daemon (spamassassin bug #28789) 2014-06-21 9:57 ` Sergey Y. Afonin @ 2014-06-21 10:11 ` Sergey Y. Afonin 2014-06-21 10:15 ` Dmitry V. Levin 2014-06-21 17:02 ` Led 1 sibling, 1 reply; 19+ messages in thread From: Sergey Y. Afonin @ 2014-06-21 10:11 UTC (permalink / raw) To: devel On Saturday 21 June 2014, Sergey Y. Afonin wrote: > Мне вот подумалось, может, добавить stop_daemon() и т.п. параметр --spacechar ? > Тогда можно бы было написать как-то так: > > stop_daemon --name "/usr/bin/spamd_" --spacechar "_", а перед вызовом > start-stop-daemon, соответственно, символы менять на пробелы. http://bugzilla.altlinux.org/30133 -- С уважением, Сергей Афонин ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [devel] start-stop-daemon (spamassassin bug #28789) 2014-06-21 10:11 ` Sergey Y. Afonin @ 2014-06-21 10:15 ` Dmitry V. Levin 2014-06-21 10:41 ` Sergey Y. Afonin 0 siblings, 1 reply; 19+ messages in thread From: Dmitry V. Levin @ 2014-06-21 10:15 UTC (permalink / raw) To: ALT Devel discussion list [-- Attachment #1: Type: text/plain, Size: 501 bytes --] On Sat, Jun 21, 2014 at 02:11:50PM +0400, Sergey Y. Afonin wrote: > On Saturday 21 June 2014, Sergey Y. Afonin wrote: > > > Мне вот подумалось, может, добавить stop_daemon() и т.п. параметр --spacechar ? > > Тогда можно бы было написать как-то так: > > > > stop_daemon --name "/usr/bin/spamd_" --spacechar "_", а перед вызовом > > start-stop-daemon, соответственно, символы менять на пробелы. > > http://bugzilla.altlinux.org/30133 Пожалуйста, не надо городить костыли. -- ldv [-- Attachment #2: Type: application/pgp-signature, Size: 181 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [devel] start-stop-daemon (spamassassin bug #28789) 2014-06-21 10:15 ` Dmitry V. Levin @ 2014-06-21 10:41 ` Sergey Y. Afonin 2014-06-21 10:47 ` Dmitry V. Levin 0 siblings, 1 reply; 19+ messages in thread From: Sergey Y. Afonin @ 2014-06-21 10:41 UTC (permalink / raw) To: ALT Devel discussion list On Saturday 21 June 2014, Dmitry V. Levin wrote: > > > stop_daemon --name "/usr/bin/spamd_" --spacechar "_", а перед вызовом > > > start-stop-daemon, соответственно, символы менять на пробелы. > > > > http://bugzilla.altlinux.org/30133 > > Пожалуйста, не надо городить костыли. А какой есть вариант для подобных ситуаций ? Если вот надо передать туда пробел ? Напоминаю, что /proc/<pid>/exe указывает на /usr/bin/perl<version>. Хотя... В принципе, в данном конкретном случае, можно отслеживать, куда именно указывает /usr/bin/perl, и это и подставлять. Но пробел в --name, всё равно, может потребоваться где-то ещё. -- С уважением, Сергей Афонин ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [devel] start-stop-daemon (spamassassin bug #28789) 2014-06-21 10:41 ` Sergey Y. Afonin @ 2014-06-21 10:47 ` Dmitry V. Levin 2014-06-21 11:03 ` Sergey Y. Afonin 0 siblings, 1 reply; 19+ messages in thread From: Dmitry V. Levin @ 2014-06-21 10:47 UTC (permalink / raw) To: ALT Devel discussion list [-- Attachment #1: Type: text/plain, Size: 1199 bytes --] On Sat, Jun 21, 2014 at 02:41:51PM +0400, Sergey Y. Afonin wrote: > On Saturday 21 June 2014, Dmitry V. Levin wrote: > > > > > stop_daemon --name "/usr/bin/spamd_" --spacechar "_", а перед вызовом > > > > start-stop-daemon, соответственно, символы менять на пробелы. > > > > > > http://bugzilla.altlinux.org/30133 > > > > Пожалуйста, не надо городить костыли. > > А какой есть вариант для подобных ситуаций ? Если вот надо передать туда > пробел ? Напоминаю, что /proc/<pid>/exe указывает на /usr/bin/perl<version>. Если нужно передавать пробел, то нужно передавать пробел, только зачем? Вот смотрю я на систему, в которой работает spamd: # start-stop-daemon --stop --name spamd --pidfile /var/run/spamd.pid --user root --test Would send signal 15 to 567. start-stop-daemon --stop --exec /usr/bin/perl --pidfile /var/run/spamd.pid --user root --test Would send signal 15 to 567. > Хотя... В принципе, в данном конкретном случае, можно отслеживать, куда > именно указывает /usr/bin/perl, и это и подставлять. Но пробел в --name, > всё равно, может потребоваться где-то ещё. Если за все эти годы ни разу не потребовался, то вряд ли уже потребуется. -- ldv [-- Attachment #2: Type: application/pgp-signature, Size: 181 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [devel] start-stop-daemon (spamassassin bug #28789) 2014-06-21 10:47 ` Dmitry V. Levin @ 2014-06-21 11:03 ` Sergey Y. Afonin 0 siblings, 0 replies; 19+ messages in thread From: Sergey Y. Afonin @ 2014-06-21 11:03 UTC (permalink / raw) To: ALT Devel discussion list On Saturday 21 June 2014, Dmitry V. Levin wrote: > > А какой есть вариант для подобных ситуаций ? Если вот надо передать туда > > пробел ? Напоминаю, что /proc/<pid>/exe указывает на /usr/bin/perl<version>. > > Если нужно передавать пробел, то нужно передавать пробел Так не передаётся же. Что-то где-то не так экранируется, или я не знаю, как его заэкранировать правильно. > start-stop-daemon --stop --exec /usr/bin/perl --pidfile /var/run/spamd.pid --user root --test > Would send signal 15 to 567. Хм. А вот тут -x|--exec executable Check for processes that are instances of this executable (according to /proc/pid/exe ). не написано, что симлинк расценивается, как конечный файл. -- С уважением, Сергей Афонин ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [devel] start-stop-daemon (spamassassin bug #28789) 2014-06-21 9:57 ` Sergey Y. Afonin 2014-06-21 10:11 ` Sergey Y. Afonin @ 2014-06-21 17:02 ` Led 2014-06-21 18:28 ` Sergey Y. Afonin 1 sibling, 1 reply; 19+ messages in thread From: Led @ 2014-06-21 17:02 UTC (permalink / raw) To: ALT Linux Team development discussions On Saturday 21 June 2014 12:57:35 Sergey Y. Afonin wrote: > On Friday 20 June 2014, Led wrote: > > >> http://lists.altlinux.org/pipermail/sisyphus/2014-May/362302.html > > > > > > Да, это вот обсуждение рядом. Но у spamd чуть проще: просто пробел > > > попал в конце. Вообще, может, стоит так же и сделать. > > > > Быстрохак: перенести spamd в /usr/sbin/ (где, наверное, ему и место) и > > использовать '--name /usr/sbin/spamd'. > > Понятно, что это не решение, но такая уж специфика перлового $0 (о чём > > в "perldoc -v '$0'" и говорится). > > А в каких пакетах документация ? Что-то не нахожу, а perldoc ругается: > No documentation found for "perlvar". > > Имеется ввиду, что пробел в конце ? И чем поможет перенос в /usr/sbin ? > Там этот пробел пропадёт ? Я указал, где объясняется "ситуация с пробелом". Просто почитайте. Как только прочитаете, станет ясно, почему перенос в /usr/sbin/ помогает (в данном конкретном случае). -- Led ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [devel] start-stop-daemon (spamassassin bug #28789) 2014-06-21 17:02 ` Led @ 2014-06-21 18:28 ` Sergey Y. Afonin 2014-06-21 18:29 ` Led 0 siblings, 1 reply; 19+ messages in thread From: Sergey Y. Afonin @ 2014-06-21 18:28 UTC (permalink / raw) To: devel On Saturday 21 June 2014, Led wrote: > Я указал, где объясняется "ситуация с пробелом". Просто почитайте. А я ответил, что читать негде: $ perldoc -v '$0' No documentation found for "perlvar". Я практически не пишу на Perl, так что, чтобы даже прочитать, мне надо найти, где всё это лежит. Сложно сказать, откуда эта документация берётся ? Впрочем, необходимость отпала, примера с симлинком у --exec у start-stop-daemon хватило. -- С уважением, Сергей Афонин ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [devel] start-stop-daemon (spamassassin bug #28789) 2014-06-21 18:28 ` Sergey Y. Afonin @ 2014-06-21 18:29 ` Led 0 siblings, 0 replies; 19+ messages in thread From: Led @ 2014-06-21 18:29 UTC (permalink / raw) To: ALT Linux Team development discussions On Saturday 21 June 2014 21:28:28 Sergey Y. Afonin wrote: > On Saturday 21 June 2014, Led wrote: > > Я указал, где объясняется "ситуация с пробелом". Просто почитайте. > > А я ответил, что читать негде: > > $ perldoc -v '$0' > No documentation found for "perlvar". > > Я практически не пишу на Perl, А вобще не пишу, и не писал. > так что, чтобы даже прочитать, мне надо > найти, где всё это лежит. Сложно сказать, откуда эта документация берётся ? Я не знаю. -- Led ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [devel] start-stop-daemon (spamassassin bug #28789) 2014-06-19 8:41 [devel] start-stop-daemon (spamassassin bug #28789) Sergey Y. Afonin 2014-06-19 9:30 ` Denis G. Samsonenko @ 2014-06-19 9:33 ` Dmitry V. Levin 2014-06-19 9:52 ` Sergey Y. Afonin 2014-06-19 9:36 ` Denis G. Samsonenko 2 siblings, 1 reply; 19+ messages in thread From: Dmitry V. Levin @ 2014-06-19 9:33 UTC (permalink / raw) To: ALT Linux Team development discussions [-- Attachment #1: Type: text/plain, Size: 243 bytes --] On Thu, Jun 19, 2014 at 12:41:20PM +0400, Sergey Y. Afonin wrote: > Приветствую. > > А как start-stop-daemon обрабатывает параметры --name и --exec ? > Что с чем сравнивает ? В start-stop-daemon(8) это подробно описано. -- ldv [-- Attachment #2: Type: application/pgp-signature, Size: 181 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [devel] start-stop-daemon (spamassassin bug #28789) 2014-06-19 9:33 ` Dmitry V. Levin @ 2014-06-19 9:52 ` Sergey Y. Afonin 0 siblings, 0 replies; 19+ messages in thread From: Sergey Y. Afonin @ 2014-06-19 9:52 UTC (permalink / raw) To: ALT Linux Team development discussions On Thursday 19 June 2014, Dmitry V. Levin wrote: > > А как start-stop-daemon обрабатывает параметры --name и --exec ? > > Что с чем сравнивает ? > > В start-stop-daemon(8) это подробно описано. Ага, понятно... Что-то я там и не посмотрел. # start-stop-daemon --stop --name "/usr/bin/spamd " --pidfile /var/run/spamd.pid --user root --test Would send signal 15 to 17899. Это, наверное, надо spamd патчить... Вот только как лучше, только пробел убрать, а "/usr/bin/" добавить в инит-скипте, или "/usr/bin/" срезать тоже ?.. Или FR на start-stop-daemon... В смысле --basename... Но пробел в spamd убирать всё равно. -- С уважением, Сергей Афонин asy@altlinux.ru ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [devel] start-stop-daemon (spamassassin bug #28789) 2014-06-19 8:41 [devel] start-stop-daemon (spamassassin bug #28789) Sergey Y. Afonin 2014-06-19 9:30 ` Denis G. Samsonenko 2014-06-19 9:33 ` Dmitry V. Levin @ 2014-06-19 9:36 ` Denis G. Samsonenko 2 siblings, 0 replies; 19+ messages in thread From: Denis G. Samsonenko @ 2014-06-19 9:36 UTC (permalink / raw) To: ALT Linux Team development discussions День добрый! > А как start-stop-daemon обрабатывает параметры --name и --exec ? На сколько я понимаю, spamd -- это perl-скрипт. Недавно столкнулся с проблемой старта-остановки на ddclient, который тоже perl-скрипт. Посмотрите обсуждение тут: http://lists.altlinux.org/pipermail/sisyphus/2014-May/362302.html https://bugzilla.altlinux.org/show_bug.cgi?id=30066 Похоже не вашу проблему? -- Всего доброго, Денис. ^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2014-06-21 18:29 UTC | newest] Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2014-06-19 8:41 [devel] start-stop-daemon (spamassassin bug #28789) Sergey Y. Afonin 2014-06-19 9:30 ` Denis G. Samsonenko 2014-06-19 9:59 ` Sergey Y. Afonin 2014-06-19 11:56 ` Sergey Y. Afonin 2014-06-20 4:17 ` Eugene Prokopiev 2014-06-20 6:56 ` Sergey Y. Afonin 2014-06-20 18:57 ` Led 2014-06-21 9:57 ` Sergey Y. Afonin 2014-06-21 10:11 ` Sergey Y. Afonin 2014-06-21 10:15 ` Dmitry V. Levin 2014-06-21 10:41 ` Sergey Y. Afonin 2014-06-21 10:47 ` Dmitry V. Levin 2014-06-21 11:03 ` Sergey Y. Afonin 2014-06-21 17:02 ` Led 2014-06-21 18:28 ` Sergey Y. Afonin 2014-06-21 18:29 ` Led 2014-06-19 9:33 ` Dmitry V. Levin 2014-06-19 9:52 ` Sergey Y. Afonin 2014-06-19 9:36 ` Denis G. Samsonenko
ALT Linux Team development discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \ devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru public-inbox-index devel Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.devel AGPL code for this site: git clone https://public-inbox.org/public-inbox.git