Package write_rcfile and bandwidthd
-
Had a go at getting bandwidthd to run on 2.2 Alix2D13 nanoBSD. with success in the end.
Firstly, /usr/local/etc existed, but not /usr/local/etc/rc.d - somehow this dir is not there and so attempts to write *.sh files in it fail. Make write_rcfile() check and create: https://github.com/pfsense/pfsense/pull/1120
Then the executable ends up in a longer path with an extra "/local" in it. And it needs an LD_LIBRARY_PATH to know where to find some of its libraries. https://github.com/pfsense/pfsense-packages/pull/651
That makes it work, and I don't think it will break anything on older pfSense releases.
Would be interesting to know how it goes on a 2.2 full install also. -
I uninstalled bandwidthd completely, then installed again using this latest overnight PBI build:
bandwidthd-2.0.1_6-i386.pbi 22-Apr-2014 11:11 7758738
There are the same issues with the new location of the executable being down another level in a "/local", and with needing the LD_LIBRARY_PATH stuff to find it libraries.
The code in the pull requests referenced above made it work, exactly as before.
So that is needed, or some other more generic solution that magically works out what to do for packages in general.
Reference snort thread that sounds like it has similar things that need changing: https://forum.pfsense.org/index.php?topic=75780.0
and I guess this will happen in other packages… -
As per Renato's request on the GitHUb pull request, I will try the standard bandwidthd install again after the next (25 April) snapshot builds, and using the latest built bandwidthd PBI. Will report if it works, or still needs this LD_LIBRARY_PATH stuff.
Will post back tomorrow… -
2.2-ALPHA (i386)
built on 20140428-0050
FreeBSD 10.0-STABLEbandwidthd package downloads and installs, but the bandwidthd executable is in a different place to where it was in 2.1.n versions.
Applied the changes from https://github.com/pfsense/pfsense-packages/pull/651Diagnostics->Command Prompt
Did this:require_once("/usr/local/pkg/bandwidthd.inc"); bandwidthd_install_deinstall(); bandwidthd_install_config();
and it works. 3 minutes later I have bandwidthd graphs of my LAN clients usage.
So yes, these changes are needed with the latest builds of pfSense and the package.