svn commit: r316359 - in stable/11/etc/periodic: daily monthly weekly

Alan Somers asomers at FreeBSD.org
Sat Apr 1 16:22:08 UTC 2017


Author: asomers
Date: Sat Apr  1 16:22:07 2017
New Revision: 316359
URL: https://svnweb.freebsd.org/changeset/base/316359

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
  MFC after:	3 weeks
  Sponsored by:	Spectra Logic Corp

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

Modified: stable/11/etc/periodic/daily/999.local
==============================================================================
--- stable/11/etc/periodic/daily/999.local	Sat Apr  1 15:04:37 2017	(r316358)
+++ stable/11/etc/periodic/daily/999.local	Sat Apr  1 16:22:07 2017	(r316359)
@@ -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/11/etc/periodic/monthly/999.local
==============================================================================
--- stable/11/etc/periodic/monthly/999.local	Sat Apr  1 15:04:37 2017	(r316358)
+++ stable/11/etc/periodic/monthly/999.local	Sat Apr  1 16:22:07 2017	(r316359)
@@ -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/11/etc/periodic/weekly/999.local
==============================================================================
--- stable/11/etc/periodic/weekly/999.local	Sat Apr  1 15:04:37 2017	(r316358)
+++ stable/11/etc/periodic/weekly/999.local	Sat Apr  1 16:22:07 2017	(r316359)
@@ -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:"
 


More information about the svn-src-stable mailing list