Lines Matching +full:normal +full:-
3 # A regular expression matching the format of an RFC-5424 log line header,
6 RFC5424_FMT='^<[0-9][0-9]*>1 [0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}'
8 # A regular expression matching the format of an RFC-3164 (traditional syslog)
10 RFC3164_FMT='^[A-Z][a-z]{2} [ 0-9][0-9] [0-9]{2}:[0-9]{2}:[0-9]{2}'
14 if [ $? -ne 0 ]; then
39 message="$message $COUNT - $NAME"
40 if [ -n "$TODO" ]
52 echo "$CN-$CN" >$1
58 if [ -f $2 ] && echo "$1-$1" | diff - $2 >/dev/null
69 if [ -f $1 ]
81 if [ -r $1 ]
89 # Check if a file is there, depending of if it's supposed to or not -
98 if [ $curcnt -le $keepcnt ]
108 # Verify that the specified file has RFC-5424 rotation messages.
111 local lc=$(wc -l $1 | cut -w -f2)
112 local rc=$(grep -cE "${RFC5424_FMT}" $1)
113 if [ "$lc" -eq 0 -o "$rc" -eq 0 -o "$lc" -ne "$rc" ]
122 # Verify that the specified file has RFC-3164 rotation messages.
125 local lc=$(wc -l $1 | cut -w -f2)
126 local rc=$(grep -cE "${RFC3164_FMT}" $1)
127 if [ "$lc" -eq 0 -o "$rc" -eq 0 -o "$lc" -ne "$rc" ]
151 if [ $1 -gt 0 ]
162 if [ $1 -eq 0 ]
174 if [ $cnt -eq `echo "$@" | wc -w` ]
195 rm -rf ${TMPDIR}/log ${TMPDIR}/alog
203 rm -rf "${TMPDIR}/log" "${TMPDIR}/alog" newsyslog.conf
209 newsyslog -f ../newsyslog.conf -F -r "$@"
218 if [ -n "$dir" ]; then
219 newsyslog_args=" -a ${dir}"
228 begin "create file ${name_postfix}" -newdir
229 run_newsyslog -C
234 begin "rotate normal 1 ${name_postfix}"
241 begin "rotate normal 2 ${name_postfix}"
249 begin "rotate normal 3 ${name_postfix}"
258 begin "rotate normal 4 ${name_postfix}"
267 begin "rotate normal 5 ${name_postfix}"
280 ofiles=`ls -Tl ${dir}${LOGFNAME}.*${ext} | tr -d '\n'`
281 run_newsyslog ${newsyslog_args} -n >/dev/null
283 ckstr "$ofiles" "`ls -lT ${dir}${LOGFNAME}.*${ext} | tr -d '\n'`"
296 if [ -n "$dir" ]; then
297 newsyslog_args=" -a ${dir}"
306 begin "create file ${name_postfix}" -newdir
307 run_newsyslog -C
312 begin "rotate normal 1 cnt=$cnt ${name_postfix}"
319 begin "rotate normal 2 cnt=$cnt ${name_postfix}"
327 begin "rotate normal 3 cnt=$cnt ${name_postfix}"
336 begin "rotate normal 3 cnt=$cnt ${name_postfix}"
350 osum=`md5 ${dir}${LOGFNAME} | tr -d '\n'`
351 run_newsyslog ${newsyslog_args} -n >/dev/null
353 ckstr "$osum" "`md5 ${dir}${LOGFNAME} | tr -d '\n'`"
365 if [ -n "$dir" ]; then
366 newsyslog_args="-t DEFAULT -a ${dir}"
369 newsyslog_args="-t DEFAULT"
375 begin "create file ${name_postfix}" -newdir
376 run_newsyslog -C ${newsyslog_args}
411 ofiles=`ls -1 ${dir}${LOGFNAME}.*${ext} | tr -d '\n'`
412 run_newsyslog ${newsyslog_args} -n >/dev/null
414 ckstr "$ofiles" "`ls -1 ${dir}${LOGFNAME}.*${ext} | tr -d '\n'`"
426 if [ -n "$dir" ]; then
427 newsyslog_args=" -a ${dir}"
436 begin "RFC-5424 - create file ${name_postfix}" -newdir
437 run_newsyslog -C
446 begin "RFC-5424 - rotate normal 1 ${name_postfix}"
469 run_newsyslog -C
504 run_newsyslog -C
509 begin "rotate normal 1"
528 mkdir -p ${TMPDIR}
534 # Log file for RFC-5424 testing
538 # Normal, no archive dir, keep X files
551 # Normal, no archive dir, keep X files, gz
564 # Normal, no archive dir
580 # Normal, archive dir
628 # RFC-5424; Normal, no archive dir
639 rm -rf "${TMPDIR}"