Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Nov 2017 23:51:51 +0000 (UTC)
From:      Alan Somers <asomers@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r326041 - head/usr.sbin/periodic
Message-ID:  <201711202351.vAKNppEG038293@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201711202351.vAKNppEG038293>