Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 186700 - net-analyzer/FlowScan initscript doesn't work
Summary: net-analyzer/FlowScan initscript doesn't work
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High major
Assignee: Benjamin Smee (strerror) (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-26 15:33 UTC by Duncan Lockwood
Modified: 2007-08-20 09:34 UTC (History)
2 users (show)

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 Duncan Lockwood 2007-07-26 15:33:07 UTC
The init script that comes with net-analyzer/FlowScan/FlowScan-1.006-r2.ebuild doesn't work. It seems to be a problem with paths.

The current script changes directory, and then runs start-stop-daemon with a relative path. This doesn't work. I have changed it to simply call flowscan with an absolute path, and it works now.

I added an eend too just so we get an OK.

Here is my patch:-

--- /usr/portage/net-analyzer/FlowScan/files/flowscan.init      2007-02-01 21:06:29.000000000 +0000
+++ /etc/init.d/flowscan        2007-07-26 16:26:33.000000000 +0100
@@ -8,8 +8,9 @@
 
 start() {
        ebegin "Starting flowscan processing"
-       cd /var/lib/flows ; start-stop-daemon --start --quiet -c flows:flows --exec bin/flowscan \
+       start-stop-daemon --start --quiet -c flows:flows --exec /var/lib/flows/bin/flowscan \
        -p /var/run/flows/flowscan.pid -m -b >> /var/log/flowscan 2>&1 </dev/null & >/dev/null
+       eend $?
 }
 
 stop() {



Cheers,

Dunc
Comment 1 Duncan Lockwood 2007-07-26 15:33:57 UTC
Ah that formatting is all wrong, I'll mail it to you if you want, but it's so small anyway.
Comment 2 Duncan Lockwood 2007-08-15 11:29:23 UTC
Hi folks,

I realise this isn't a massive bug in the grand scheme of things (although it kinda is, as in the init script just doesn't work)

I was just wondering if maybe the maintainer of this package is no more, or too busy or something, and that's why there has been no followups?

I'm happy to help by taking over it if this is the case, if not then please accept my apologies if you just haven't got round to it yet.

Dunc
Comment 3 Markus Ullmann (RETIRED) gentoo-dev 2007-08-15 11:55:36 UTC
Taking this...

Applied your patch to -r3 in CVS, thanks for the report
and sorry for the delay
Comment 4 Duncan Lockwood 2007-08-15 13:01:41 UTC
Ah, I was going to follow up with another bit actually, just to display messages for stopping too.

Can I browse the new file in CVS somehow? If so I'll send you another.

Cheers,

Dunc

Comment 5 Duncan Lockwood 2007-08-15 20:06:28 UTC
--- /usr/portage/net-analyzer/FlowScan/files/flowscan.init      2007-02-01 21:06:29.000000000 +0000
+++ /etc/init.d/flowscan        2007-08-15 12:27:11.000000000 +0100
@@ -8,10 +8,13 @@
 
 start() {
        ebegin "Starting flowscan processing"
-       cd /var/lib/flows ; start-stop-daemon --start --quiet -c flows:flows --exec bin/flowscan \
+       start-stop-daemon --start --quiet -c flows:flows --exec /var/lib/flows/bin/flowscan \
        -p /var/run/flows/flowscan.pid -m -b >> /var/log/flowscan 2>&1 </dev/null & >/dev/null
+       eend $?
 }
 
 stop() {
+       ebegin "Stopping flowscan processing"
        start-stop-daemon --stop --quiet -p /var/run/flows/flowscan.pid
+       eend $?
 }


This is what I ended up with, this is a patch from the original file, so it includes the patch u added today. I should have tweaked b4 flagging you today sorry. 
You hardly need a patch for this, I've just added those 2 lines in the stop() section, but if you rather would have one, then I'll certainly do it.

Cheers,

Dunc
Comment 6 Markus Ullmann (RETIRED) gentoo-dev 2007-08-20 09:34:35 UTC
Okay, makes sense ;)
Though as it's not really worth the hassle for a recompile, I'm just applying this  but don't revbump.

Fixed in CVS, thanks and keep up the good work :)