git: b45f09ac5756 - main - periodic: switch lockf to silent operation.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 28 Feb 2023 08:49:18 UTC
The branch main has been updated by netchild: URL: https://cgit.FreeBSD.org/src/commit/?id=b45f09ac57567de5c99a98941e5e06ecd5074871 commit b45f09ac57567de5c99a98941e5e06ecd5074871 Author: Alexander Leidinger <netchild@FreeBSD.org> AuthorDate: 2023-02-28 08:38:42 +0000 Commit: Alexander Leidinger <netchild@FreeBSD.org> CommitDate: 2023-02-28 08:38:42 +0000 periodic: switch lockf to silent operation. This fixes duplicate mails (one from cron, one from periodic) when a periodic run is not finished bfore the next one starts. The man page states that the intended use case is cron, and the error handling of the lockf invocation handles this case explicitely, as such no error message for the "interactive" use was considered. --- usr.sbin/periodic/periodic.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/periodic/periodic.sh b/usr.sbin/periodic/periodic.sh index 26413c4ab51e..cdbd1b3b57fb 100644 --- a/usr.sbin/periodic/periodic.sh +++ b/usr.sbin/periodic/periodic.sh @@ -53,7 +53,7 @@ if [ $1 != "LOCKED" ]; then ret=0 for arg; do lockfile=/var/run/periodic.${arg##*/}.lock - lockf -t 0 "${lockfile}" /bin/sh $0 LOCKED "$arg" + lockf -s -t 0 "${lockfile}" /bin/sh $0 LOCKED "$arg" case $? in 0) ;; 73) #EX_CANTCREATE