Skip to contentSkip to conversation

syslog facility config choice

Openvpn-devel P Kern 1 participant 2 messages Jan 28, 2005

lore
Share & tools
lore

P Kern

author
#0 lore raw

Hello.

It would be useful if the syslog facility could be optionally set to something other than LOG_DAEMON. There are too many things logging to LOG_DAEMON, already. Something like what's included below would be great. Then "LOG_OPENVPN" (or whatever) could be chosen at config time. (eg. local6.* is idle here so I used "-DLOG_OPENVPN=LOG_LOCAL6").

Thanks in advance.
pk.

===================================================================
RCS file: error.c,v
retrieving revision 1.1
diff -c -r1.1 error.c
*** error.c 2005/01/25 18:54:13 1.1
--- error.c 2005/01/25 18:57:35
***************
*** 49,54 ****
--- 49,60 ----

  #include "memdbg.h"

+ #if SYSLOG_CAPABILITY
+ #ifndef LOG_OPENVPN
+ #define LOG_OPENVPN LOG_DAEMON
+ #endif
+ #endif
+
/* Globals */
unsigned int x_debug_level; /* GLOBAL */

***************
*** 394,400 ****
if (!use_syslog)
{
pgmname_syslog = string_alloc (pgmname ? pgmname : PACKAGE, NULL);
! openlog (pgmname_syslog, LOG_PID, LOG_DAEMON);
use_syslog = true;

/* Better idea: somehow pipe stdout/stderr output to msg() */
--- 400,406 ----
if (!use_syslog)
{
pgmname_syslog = string_alloc (pgmname ? pgmname : PACKAGE, NULL);
! openlog (pgmname_syslog, LOG_PID, LOG_OPENVPN);
use_syslog = true;

/* Better idea: somehow pipe stdout/stderr output to msg() */

author
#1 lore raw

[Openvpn-devel] '#!/bin/sh' instead of '#!/bin/bash' ... please?

Hello.
Minor nit. Could the scripts in the source tree be made to use '#!/bin/sh' instead of '#!/bin/bash'? On FreeBSD (at least) bash is an optional port. And even if bash was installed it would normally be found in /usr/local/bin. If scripts don't use any bash-specific features then they would be more portable if they used "#!/bin/sh". Thanks in advance. pk.