Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 587390 - net-analyzer/sec-2.7.6-r1 - Runscript's status function always returns "crashed" because of a changing process name
Summary: net-analyzer/sec-2.7.6-r1 - Runscript's status function always returns "crash...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-28 08:50 UTC by Marcin Mirosław
Modified: 2016-07-04 10:14 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcin Mirosław 2016-06-28 08:50:58 UTC
# /etc/init.d/sec start && /etc/init.d/sec status ; cat /run/sec.pid && ps aux|grep sec
 * Starting sec ...                   [ ok ]
 * status: crashed
1353
root      1353  0.0  1.1  25568 11580 ?        S    10:47   0:00 /usr/bin/perl -w /usr/bin/sec -pid=/run/sec.pid -detach -log=/var/log/sec.log -conf=/etc/sec.conf -input=/var/log/messages -input=/var/db/rbldnsd/log -debug=4

After changing init script:
- start-stop-daemon --start --quiet --exec /usr/bin/sec \
+ start-stop-daemon --start --quiet --interpreted --exec /usr/bin/sec \

It works as it should:
# /etc/init.d/sec start && /etc/init.d/sec status ; cat /run/sec.pid && ps aux|grep sec
 * Starting sec ...                                                                                                                                                                                      [ ok ]
 * status: started
3523
root      3523  0.0  1.1  25504 11720 ?        S    10:50   0:00 /usr/bin/perl -w /usr/bin/sec -pid=/run/sec.pid -detach -log=/var/log/sec.log -conf=/etc/sec.conf -input=/var/log/messages -input=/var/db/rbldnsd/log -debug=4
Comment 1 Thomas Deutschmann (RETIRED) gentoo-dev 2016-06-30 14:00:49 UTC
Another option would be to use the PID file for status checking instead of the changing process name, i.e. you only have to set

> pidfile="/run/sec.pid"

in "/etc/init.d/sec", which should also fix the problem and is more reliable.
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2016-07-04 07:43:22 UTC
Fixed everywhere, but particularly in 2.7.10.

Thanks for the patch.
Comment 3 Marcin Mirosław 2016-07-04 10:14:57 UTC
It works, thanks.