[Bug 209038] security/amavisd-new rc script for p0fanalyzer doesn't work correctl
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Mon Apr 25 16:45:52 UTC 2016
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=209038
Bug ID: 209038
Summary: security/amavisd-new rc script for p0fanalyzer doesn't
work correctl
Product: Ports & Packages
Version: Latest
Hardware: Any
OS: Any
Status: New
Severity: Affects Some People
Priority: ---
Component: Individual Port(s)
Assignee: gabor at FreeBSD.org
Reporter: 000.fbsd at quip.cz
Assignee: gabor at FreeBSD.org
Flags: maintainer-feedback?(gabor at FreeBSD.org)
It starts OK but does not restart properly, because kill signal returns
imediately, but shutdown of the deamon takes longer time and thus start attempt
failed to bind on already opened socket
# service amavis-p0fanalyzer restart
Binding to socket [::1]:2345 failed (using IO::Socket::IP): Address already in
use at /usr/local/sbin/p0f-analyzer.pl line 375.
p0fanalyzer_stop() should be changed to wait till daemon really die.
And should check if daemon is runnig and PID file exists, because second
attempt to (re)start p0f emits this error:
# service amavis-p0fanalyzer restart
cat: /var/run/p0fanalyzer2.pid: No such file or directory
usage: kill [-s signal_name] pid ...
kill -l [exit_status]
kill -signal_name pid ...
kill -signal_number pid ...
cat: /var/run/p0fanalyzer1.pid: No such file or directory
usage: kill [-s signal_name] pid ...
kill -l [exit_status]
kill -signal_name pid ...
kill -signal_number pid ...
This error can be fixed by this simple change:
p0fanalyzer_stop()
{
test -s ${amavis_p0fanalyzer_pidfile2} && /bin/kill `cat
${amavis_p0fanalyzer_pidfile2}` && rm ${amavis_p0fanalyzer_pidfile2}
test -s ${amavis_p0fanalyzer_pidfile1} && /bin/kill `cat
${amavis_p0fanalyzer_pidfile1}` && rm ${amavis_p0fanalyzer_pidfile1}
}
I don't know how to handle the first problem with slowly dying daemon.
Also I am not sure if there must be the "rm" part in p0fanalyzer_stop()
function, because man daemon says that the pid file will be removed.
cite: The program is executed in a
spawned child process while the daemon waits until it terminates
to keep the child_pidfile locked and removes it after the process
exits.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-ports-bugs
mailing list