aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Leidinger <netchild@FreeBSD.org>2023-02-28 08:38:42 +0000
committerAlexander Leidinger <netchild@FreeBSD.org>2023-02-28 08:38:42 +0000
commitb45f09ac57567de5c99a98941e5e06ecd5074871 (patch)
tree3b4ccb486fb4de3a0faae694c482ccb278db224e
parent05e2e803ebe8e791754bae6333e70e096bde47e7 (diff)
downloadsrc-b45f09ac57567de5c99a98941e5e06ecd5074871.tar.gz
src-b45f09ac57567de5c99a98941e5e06ecd5074871.zip
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.
-rw-r--r--usr.sbin/periodic/periodic.sh2
1 files changed, 1 insertions, 1 deletions
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