last_patch116 from vodz:
Stephane, >Using busybox+uclibc, crond syslog messages look like: > >Oct 9 09:04:46 soekris cron.notice crond[347]: ^Icrond 2.3.2 dillon, >started, log level 8 Thanks for testing. >The attached patch corrects the problem. Your patch is not correct. Correct patch attached. Also. Last patch have - add "Broken pipe" message to ash.c - busybox ash synced with dash_0.4.18 --w vodz
This commit is contained in:
@@ -114,24 +114,26 @@ static void
|
||||
crondlog(const char *ctl, ...)
|
||||
{
|
||||
va_list va;
|
||||
const char *fmt;
|
||||
int level = (int)(ctl[0] & 0xf);
|
||||
int type = level == 20 ?
|
||||
LOG_ERR : ((ctl[0] & 0100) ? LOG_WARNING : LOG_NOTICE);
|
||||
|
||||
|
||||
va_start(va, ctl);
|
||||
fmt = ctl+1;
|
||||
if (level >= LogLevel) {
|
||||
|
||||
#ifdef FEATURE_DEBUG_OPT
|
||||
if (DebugOpt) vfprintf(stderr, ctl, va);
|
||||
if (DebugOpt) vfprintf(stderr, fmt, va);
|
||||
else
|
||||
#endif
|
||||
if (LogFile == 0) vsyslog(type, ctl, va);
|
||||
if (LogFile == 0) vsyslog(type, fmt, va);
|
||||
else {
|
||||
int logfd;
|
||||
|
||||
if ((logfd = open(LogFile, O_WRONLY|O_CREAT|O_APPEND, 600)) >= 0) {
|
||||
vdprintf(logfd, ctl, va);
|
||||
vdprintf(logfd, fmt, va);
|
||||
close(logfd);
|
||||
#ifdef FEATURE_DEBUG_OPT
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user