From owner-svn-src-all@freebsd.org Mon Nov 20 23:51:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08E85D94AF0; Mon, 20 Nov 2017 23:51:53 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C5A7F73201; Mon, 20 Nov 2017 23:51:52 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAKNpps5038294; Mon, 20 Nov 2017 23:51:51 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAKNppEG038293; Mon, 20 Nov 2017 23:51:51 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201711202351.vAKNppEG038293@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Mon, 20 Nov 2017 23:51:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326041 - head/usr.sbin/periodic X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/usr.sbin/periodic X-SVN-Commit-Revision: 326041 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Nov 2017 23:51:53 -0000 Author: asomers Date: Mon Nov 20 23:51:51 2017 New Revision: 326041 URL: https://svnweb.freebsd.org/changeset/base/326041 Log: 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 MFC after: 3 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D13070 Modified: head/usr.sbin/periodic/periodic.sh Modified: head/usr.sbin/periodic/periodic.sh ============================================================================== --- head/usr.sbin/periodic/periodic.sh Mon Nov 20 23:45:42 2017 (r326040) +++ head/usr.sbin/periodic/periodic.sh Mon Nov 20 23:51:51 2017 (r326041) @@ -103,7 +103,7 @@ case $arg in dirlist="$arg" else echo "$0: $arg not found" >&2 - continue + exit 1 fi ;; *) dirlist=