[Fai-commit] r3796 - trunk/lib

fai-commit at lists.alioth.debian.org fai-commit at lists.alioth.debian.org
Thu Aug 24 17:08:54 UTC 2006


Author: lange
Date: 2006-08-24 17:08:54 +0000 (Thu, 24 Aug 2006)
New Revision: 3796

Modified:
   trunk/lib/subroutines
Log:
use cmdlineclasses for defining classes (when using -c)


Modified: trunk/lib/subroutines
===================================================================
--- trunk/lib/subroutines	2006-08-24 17:08:18 UTC (rev 3795)
+++ trunk/lib/subroutines	2006-08-24 17:08:54 UTC (rev 3796)
@@ -297,13 +297,15 @@
 	# reevaluate new list of classes
 	fai-class -T $FAI/class $LOGDIR/FAI_CLASSES
 	classes=$(< $LOGDIR/FAI_CLASSES)
-    else
+    elif [ -n "$cmdlineclasses" ]; then
+	classes=$cmdlineclasses
+    elif [ ! -f /var/log/fai/FAI_CLASSES ]; then
 	# use classes defined at installation time
-	if [ ! -f /var/log/fai/FAI_CLASSES ]; then
 	    die "Try to read classes from /var/log/fai/FAI_CLASSES. Failed. Aborting."
-	fi
+    else
 	classes=$(< /var/log/fai/FAI_CLASSES)
     fi
+    echo "List of all classes: $classes"
 
     # define classes as: a.b.c.d for cfengine -D
     # this doesn't work without echo




More information about the Fai-commit mailing list