diff options
author | Mike Frysinger <vapier@gentoo.org> | 2015-07-23 02:53:54 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2015-07-23 02:53:54 +0000 |
commit | 7dd650040774e815bf6f646cee5b51b7a49948a9 (patch) | |
tree | 3f43878d63e5bd3b0cf576dae33f26f8a78acbce /sys-process/cronbase | |
parent | Mark arm64/m68k/s390/sh stable. (diff) | |
download | gentoo-2-7dd650040774e815bf6f646cee5b51b7a49948a9.tar.gz gentoo-2-7dd650040774e815bf6f646cee5b51b7a49948a9.tar.bz2 gentoo-2-7dd650040774e815bf6f646cee5b51b7a49948a9.zip |
Use err level when logging failed scripts #540274 by Tobias Klausmann.
(Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key D2E96200)
Diffstat (limited to 'sys-process/cronbase')
-rw-r--r-- | sys-process/cronbase/ChangeLog | 8 | ||||
-rw-r--r-- | sys-process/cronbase/cronbase-0.3.5-r1.ebuild (renamed from sys-process/cronbase/cronbase-0.3.5.ebuild) | 2 | ||||
-rwxr-xr-x | sys-process/cronbase/files/run-crons-0.3.5 | 13 |
3 files changed, 16 insertions, 7 deletions
diff --git a/sys-process/cronbase/ChangeLog b/sys-process/cronbase/ChangeLog index 5de901462542..051b114c74fd 100644 --- a/sys-process/cronbase/ChangeLog +++ b/sys-process/cronbase/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sys-process/cronbase # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-process/cronbase/ChangeLog,v 1.44 2015/07/22 07:12:15 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-process/cronbase/ChangeLog,v 1.45 2015/07/23 02:53:54 vapier Exp $ + +*cronbase-0.3.5-r1 (23 Jul 2015) + + 23 Jul 2015; Mike Frysinger <vapier@gentoo.org> +cronbase-0.3.5-r1.ebuild, + -cronbase-0.3.5.ebuild, files/run-crons-0.3.5: + Use err level when logging failed scripts #540274 by Tobias Klausmann. *cronbase-0.3.5 (22 Jul 2015) diff --git a/sys-process/cronbase/cronbase-0.3.5.ebuild b/sys-process/cronbase/cronbase-0.3.5-r1.ebuild index 5762bf66923b..d40ee3acf051 100644 --- a/sys-process/cronbase/cronbase-0.3.5.ebuild +++ b/sys-process/cronbase/cronbase-0.3.5-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-process/cronbase/cronbase-0.3.5.ebuild,v 1.1 2015/07/22 07:12:15 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-process/cronbase/cronbase-0.3.5-r1.ebuild,v 1.1 2015/07/23 02:53:54 vapier Exp $ EAPI="5" diff --git a/sys-process/cronbase/files/run-crons-0.3.5 b/sys-process/cronbase/files/run-crons-0.3.5 index a8b6ad2c4c8c..eb904138c989 100755 --- a/sys-process/cronbase/files/run-crons-0.3.5 +++ b/sys-process/cronbase/files/run-crons-0.3.5 @@ -1,6 +1,6 @@ #!/bin/bash # -# $Header: /var/cvsroot/gentoo-x86/sys-process/cronbase/files/run-crons-0.3.5,v 1.1 2015/07/22 07:12:15 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-process/cronbase/files/run-crons-0.3.5,v 1.2 2015/07/23 02:53:54 vapier Exp $ # # 12 Oct 2008; Thilo Bangert <bangert@gentoo.org> run-crons: # ignore emacs backup files (bug #237200) @@ -33,9 +33,12 @@ LOCKDIR=/var/spool/cron/lastrun LOCKFILE=${LOCKDIR}/lock -# Usage: log <args to logger> +# Usage: log <level> <args to logger> +# Log a message via syslog. log() { - logger -i -p cron.info -t run-crons "$@" + local level=$1 + shift + logger -i -p "cron.${level}" -t run-crons "$@" } mkdir -p ${LOCKDIR} @@ -108,11 +111,11 @@ for BASE in hourly daily weekly monthly ; do .*|*~) continue ;; esac - log "($(whoami)) CMD (${SCRIPT})" + log info "($(whoami)) CMD (${SCRIPT})" $SCRIPT ret=$? if [ ${ret} -ne 0 ] ; then - log "CMD (${SCRIPT}) failed with exit status ${ret}" + log err "CMD (${SCRIPT}) failed with exit status ${ret}" EXIT_STATUS=1 fi fi |