Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 May 2017 16:09:54 +0000 (UTC)
From:      Alan Somers <asomers@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r319221 - in stable/10/etc/periodic: daily monthly weekly
Message-ID:  <201705301609.v4UG9s3o006436@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: asomers
Date: Tue May 30 16:09:54 2017
New Revision: 319221
URL: https://svnweb.freebsd.org/changeset/base/319221

Log:
  MFC r313069:
  
  Allow 999.local to run scripts in any language
  
  If one of the scripts listed in (daily|weekly|monthly)_local is executable,
  999.local should simply execute it. Only if the script isn't executable
  should 999.local assume it needs /bin/sh.
  
  Reviewed by:	brian
  Sponsored by:	Spectra Logic Corp

Modified:
  stable/10/etc/periodic/daily/999.local
  stable/10/etc/periodic/monthly/999.local
  stable/10/etc/periodic/weekly/999.local
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/etc/periodic/daily/999.local
==============================================================================
--- stable/10/etc/periodic/daily/999.local	Tue May 30 16:05:11 2017	(r319220)
+++ stable/10/etc/periodic/daily/999.local	Tue May 30 16:09:54 2017	(r319221)
@@ -20,7 +20,12 @@ do
     echo ''
     case "$script" in
 	/*)
-	    if [ -f "$script" ]
+	    if [ -x "$script" ]
+	    then
+		echo "Running $script:"
+
+		$script || rc=3
+	    elif [ -f "$script" ]
 	    then
 		echo "Running $script:"
 

Modified: stable/10/etc/periodic/monthly/999.local
==============================================================================
--- stable/10/etc/periodic/monthly/999.local	Tue May 30 16:05:11 2017	(r319220)
+++ stable/10/etc/periodic/monthly/999.local	Tue May 30 16:09:54 2017	(r319221)
@@ -17,7 +17,12 @@ do
     echo ''
     case "$script" in
 	/*)
-	    if [ -f "$script" ]
+	    if [ -x "$script" ]
+	    then
+		echo "Running $script:"
+
+		$script || rc=3
+	    elif [ -f "$script" ]
 	    then
 		echo "Running $script:"
 

Modified: stable/10/etc/periodic/weekly/999.local
==============================================================================
--- stable/10/etc/periodic/weekly/999.local	Tue May 30 16:05:11 2017	(r319220)
+++ stable/10/etc/periodic/weekly/999.local	Tue May 30 16:09:54 2017	(r319221)
@@ -17,7 +17,12 @@ do
     echo ''
     case "$script" in
 	/*)
-	    if [ -f "$script" ]
+	    if [ -x "$script" ]
+	    then
+		echo "Running $script:"
+
+		$script || rc=3
+	    elif [ -f "$script" ]
 	    then
 		echo "Running $script:"
 



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