bandwidthd: Addition of 2 variants of the bandwidthd package.

Addition of the bandwithd package variant from the oldpackage
Addition of the bandwidthd-pgsql package variant that can save also
in a postgres database.
Compile tested on CC and trunk (ar71xx and mvebu in both cases)
run tested on CC (ar71xx) and trunk (r47397 on mvebu)

Signed-off-by: Jean-Michel Lacroix <lacroix@lepine-lacroix.info>
This commit is contained in:
Jean-Michel Lacroix
2015-11-10 13:36:57 -05:00
parent ee0bb7b9df
commit 23fabf774e
8 changed files with 393 additions and 0 deletions
@@ -0,0 +1,36 @@
diff --git a/configure b/configure
index 4c2546e..e516137 100755
--- a/configure
+++ b/configure
@@ -2439,11 +2439,6 @@ if test -n "$x_libraries" && test "x$x_libraries" != xNONE ; then
LDFLAGS="$LDFLAGS -L$x_libraries"
fi
-# May be equired for BSD
-LDFLAGS="$LDFLAGS -L/usr/local/lib"
-
-CPPFLAGS="$CPPFLAGS -I/usr/local/include"
-
#Check for Darwin sw directory
echo "$as_me:2448: checking for /sw/lib" >&5
echo $ECHO_N "checking for /sw/lib... $ECHO_C" >&6
@@ -2505,9 +2500,6 @@ fi
fi
echo "$as_me:2506: result: $ac_cv_file__usr_pkg_lib" >&5
echo "${ECHO_T}$ac_cv_file__usr_pkg_lib" >&6
-if test $ac_cv_file__usr_pkg_lib = yes; then
- LDFLAGS="$LDFLAGS -L/usr/pkg/lib"
-fi
echo "$as_me:2512: checking for /usr/pkg/include" >&5
echo $ECHO_N "checking for /usr/pkg/include... $ECHO_C" >&6
@@ -3092,9 +3084,6 @@ fi
fi
echo "$as_me:3093: result: $ac_cv_file__usr_local_pgsql_lib" >&5
echo "${ECHO_T}$ac_cv_file__usr_local_pgsql_lib" >&6
-if test $ac_cv_file__usr_local_pgsql_lib = yes; then
- LDFLAGS="$LDFLAGS -L/usr/local/pgsql/lib"
-fi
echo "$as_me:3099: checking for /usr/local/pgsql/include" >&5
echo $ECHO_N "checking for /usr/local/pgsql/include... $ECHO_C" >&6
@@ -0,0 +1,31 @@
--- bandwidthd-2.0.1/bandwidthd.c.orig 2008-05-09 10:06:37.000000000 -0500
+++ bandwidthd-2.0.1/bandwidthd.c 2008-05-09 10:32:54.000000000 -0500
@@ -255,22 +255,22 @@
openlog("bandwidthd", LOG_CONS, LOG_DAEMON);
- if (stat("./etc/bandwidthd.conf", &StatBuf))
+ if (stat("/etc/bandwidthd.conf", &StatBuf))
{
chdir(INSTALL_DIR);
- if (stat("./etc/bandwidthd.conf", &StatBuf))
+ if (stat("/etc/bandwidthd.conf", &StatBuf))
{
- printf("Cannot find ./etc/bandwidthd.conf or %s/etc/bandwidthd.conf\n", INSTALL_DIR);
- syslog(LOG_ERR, "Cannot find ./etc/bandwidthd.conf or %s/etc/bandwidthd.conf", INSTALL_DIR);
+ printf("Cannot find /etc/bandwidthd.conf or %s/etc/bandwidthd.conf\n", INSTALL_DIR);
+ syslog(LOG_ERR, "Cannot find /etc/bandwidthd.conf or %s/etc/bandwidthd.conf", INSTALL_DIR);
exit(1);
}
}
- bdconfig_in = fopen("./etc/bandwidthd.conf", "rt");
+ bdconfig_in = fopen("/etc/bandwidthd.conf", "rt");
if (!bdconfig_in)
{
syslog(LOG_ERR, "Cannot open bandwidthd.conf");
- printf("Cannot open ./etc/bandwidthd.conf\n");
+ printf("Cannot open /etc/bandwidthd.conf\n");
exit(1);
}
bdconfig_parse();