ports/144705: net-mgmt/flow-tools-ng: support for 'status' command for setups with profiles, minor grammatical fixes
Volodymyr Kostyrko
c.kworr at gmail.com
Fri Mar 12 21:40:02 UTC 2010
>Number: 144705
>Category: ports
>Synopsis: net-mgmt/flow-tools-ng: support for 'status' command for setups with profiles, minor grammatical fixes
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Fri Mar 12 21:40:01 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: Volodymyr Kostyrko
>Release: RELENG_8
>Organization:
>Environment:
FreeBSD limbo.lan 8.0-STABLE FreeBSD 8.0-STABLE #0: Wed Mar 10 07:21:30 EET 2010 arcade at limbo.lan:/usr/obj/usr/src/sys/MINIMAL_8 i386
>Description:
Some minor changes to startup scripts:
* Now scripts properly support 'status' command with multiple profiles (Sergey Lobanov <wmn at siberianet.ru>);
* Some typos fixed.
>How-To-Repeat:
>Fix:
Patch attached with submission follows:
--- flow-tools-ng/files/flow_capture.in 2009-01-02 19:08:12.687551953 +0200
+++ flow-tools-ng/files/flow_capture.in 2010-03-12 23:11:51.235598432 +0200
@@ -14,9 +14,9 @@
# flow_capture_datadir (str): Base flow data directory.
# Default is "/var/db/flows"
# flow_capture_localip (str): IP address to bind to
-# Default to "0.0.0.0"
+# Default is "0.0.0.0"
# flow_capture_remoteip (str): IP address to accept flows from
-# Default to "0.0.0.0" or all IPs
+# Default is "0.0.0.0" or all IPs
# flow_capture_port (int): Port to accept flow data on
# Default is "8787"
# flow_capture_flags (str): Custom additional arguments to be passed
@@ -39,7 +39,7 @@
# with parameters taken from appropriate
# flow_capture_PROFILENAME_xxx variables. For
# unspecified parameters flow_capture_xxx
-# varialbes will be used.
+# variables will be used.
. /etc/rc.subr
@@ -78,6 +78,15 @@
done
}
+status_profiles()
+{
+ unset status_cmd
+ for _profile in ${flow_capture_profiles}; do
+ setup_profile_vars $_profile
+ run_rc_command "${rc_arg}"
+ done
+}
+
load_rc_config $name
: ${flow_capture_enable="NO"}
@@ -105,6 +114,7 @@
if [ "${flow_capture_profiles}" ]; then
start_cmd="start_profiles"
stop_cmd="stop_profiles"
+ status_cmd="status_profiles"
fi
run_rc_command "$cmd"
--- /usr/ports/net-mgmt/flow-tools-ng/files/flow_fanout.in 2009-07-16 04:29:06.125515729 +0300
+++ flow-tools-ng/files/flow_fanout.in 2010-03-12 23:18:09.399529475 +0200
@@ -12,9 +12,9 @@
# flow_fanout_enable (bool): Set it to "YES" to enable flow-fanout daemon.
# Set to "NO" by default.
# flow_fanout_ip (str): IP address to bind to
-# Default to "0.0.0.0"
+# Default is "0.0.0.0"
# flow_fanout_remoteip (str): IP address to accept flows from
-# Default to "0.0.0.0" or all IPs
+# Default is "0.0.0.0" or all IPs
# flow_fanout_port (int): Port to accept flow data on
# Default is "8787"
# flow_fanout_export (str): Where to send flows to. Default is "0/0/8788"
@@ -36,7 +36,7 @@
# with parameters taken from appropriate
# flow_fanout_PROFILENAME_xxx variables. For
# unspecified parameters flow_fanout_xxx
-# varialbes will be used.
+# variables will be used.
. /etc/rc.subr
@@ -73,6 +73,15 @@
done
}
+status_profiles()
+{
+ unset status_cmd
+ for _profile in ${flow_fanout_profiles}; do
+ setup_profile_vars $_profile
+ run_rc_command "${rc_arg}"
+ done
+}
+
load_rc_config $name
: ${flow_fanout_enable="NO"}
@@ -99,6 +108,7 @@
if [ "${flow_fanout_profiles}" ]; then
start_cmd="start_profiles"
stop_cmd="stop_profiles"
+ status_cmd="status_profiles"
fi
run_rc_command "$cmd"
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list