[Fai-commit] r3137 - trunk/bin

fai-repository at svn.debian.org fai-repository at svn.debian.org
Sat Dec 3 13:33:29 UTC 2005


Author: lange
Date: 2005-12-03 13:33:28 +0000 (Sat, 03 Dec 2005)
New Revision: 3137

Modified:
   trunk/bin/fai-do-scripts
Log:
bug fix: scripts matching S[0-9][0-9] are now detected,
print warning message


Modified: trunk/bin/fai-do-scripts
===================================================================
--- trunk/bin/fai-do-scripts	2005-12-02 18:11:31 UTC (rev 3136)
+++ trunk/bin/fai-do-scripts	2005-12-03 13:33:28 UTC (rev 3137)
@@ -26,7 +26,7 @@
 # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 #*********************************************************************
 
-version="version 1.4, 11-nov-2005"
+version="version 1.4.1, 3-dec-2005"
 
 # variables needed: $classes, $cfclasses, $LOGDIR
 # 
@@ -71,7 +71,7 @@
 
     # execute scripts and save their output in log files
     # cfengine, shell, perl and expect scripts are known types
-    local shelldebug file filetype
+    local shelldebug file filetype name
 
     file=$1
 
@@ -79,8 +79,10 @@
     case $file in
 	*~) echo "Skipping backup file $file" ; return ;;
     esac
-    case $file in
-	S[0-9][0-9]) echo "Script, matching S[0-9][0-9]* will not be executed any more. Please use names matching [0-9][0-9]*"; return ;;
+
+    name=$(basename $file)
+    case $name in
+	S[0-9][0-9]*) echo -e "WARNING: The script $name does not match [0-9][0-9]*.\nIt's not executed. Please rename it."; return ;;
     esac
 
     filetype=$(file $file)




More information about the Fai-commit mailing list