[Fai-commit] r5224 - in trunk: debian lib

lange at alioth.debian.org lange at alioth.debian.org
Tue Dec 9 15:40:41 UTC 2008


Author: lange
Date: 2008-12-09 15:40:41 +0000 (Tue, 09 Dec 2008)
New Revision: 5224

Modified:
   trunk/debian/changelog
   trunk/lib/subroutines
Log:
lib/subroutines: check *.var files if they are readable

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2008-12-09 12:51:26 UTC (rev 5223)
+++ trunk/debian/changelog	2008-12-09 15:40:41 UTC (rev 5224)
@@ -4,11 +4,12 @@
   * fai-server.manpages: faimond-gui.1 was not included into the package
   * fix typos in mkdebmirror, NEWS, classes_description.txt, fai-mirror,
     fai-cd.8, fai-guide.sgml
+  * lib/subroutines: check *.var files if they are readable
   
   [ Colin Tuckley ]
   * fixed spelling mistakes in fai-do-scripts.1, fai-mirror.1
   
- -- Thomas Lange <lange at debian.org>  Tue, 09 Dec 2008 13:51:13 +0100
+ -- Thomas Lange <lange at debian.org>  Tue, 09 Dec 2008 16:27:46 +0100
 
 fai (3.2.14) unstable; urgency=low
 

Modified: trunk/lib/subroutines
===================================================================
--- trunk/lib/subroutines	2008-12-09 12:51:26 UTC (rev 5223)
+++ trunk/lib/subroutines	2008-12-09 15:40:41 UTC (rev 5224)
@@ -370,7 +370,7 @@
     local odir=$(pwd)
     cd $FAI/class
     for class in $classes ; do
-	if [ -f $class.var ]; then
+	if [ -f $class.var -a -r $class.var ]; then
 	    [ "$verbose" ] && echo "Executing $class.var"
 	    # show only lines with ++, we cannot use a pipe, since it would call
 	    # _devfar in a subprocess. Then, variables are not defined 
@@ -382,7 +382,7 @@
 
     # /fai/class/S* scripts or hooks can write variable definitions
     # to additonal.var. now source these definitions
-    if [ -f $LOGDIR/additional.var ]; then
+    if [ -f $LOGDIR/additional.var -a -r $LOGDIR/additional.var ]; then
 	_defvar $LOGDIR/additional.var > $svar 2>&1
 	grep ^++ $svar
 	rm $svar




More information about the Fai-commit mailing list