From 19b4a1ede4b55166d36ace3dc7070b4b54a4a312 Mon Sep 17 00:00:00 2001 From: asomers Date: Mon, 11 Dec 2017 20:36:01 +0000 Subject: [PATCH] MFC r326041: periodic: fix exit status for nonexistent arguments When called with an absolute pathname, periodic should attempt to execute every script in that directory. If the directory does not exist, it should print an error and exit 1. Due to a copy/paste mistake in r231568, it exits 0 in that case. Reported by: devel/hs-ShellCheck Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D13070 --- 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 9633d8fbd36..7fd9f7a3cfb 100644 --- a/usr.sbin/periodic/periodic.sh +++ b/usr.sbin/periodic/periodic.sh @@ -103,7 +103,7 @@ case $arg in dirlist="$arg" else echo "$0: $arg not found" >&2 - continue + exit 1 fi ;; *) dirlist= -- 2.45.0