[Fai-commit] r5563 - trunk/bin
Thomas Lange
lange at alioth.debian.org
Tue Oct 20 08:54:43 UTC 2009
Author: lange
Date: 2009-10-20 08:54:41 +0000 (Tue, 20 Oct 2009)
New Revision: 5563
Modified:
trunk/bin/fai
Log:
test if $FAI_CONFIG_SRC is defined before using it
Modified: trunk/bin/fai
===================================================================
--- trunk/bin/fai 2009-10-19 15:01:28 UTC (rev 5562)
+++ trunk/bin/fai 2009-10-20 08:54:41 UTC (rev 5563)
@@ -136,10 +136,12 @@
unset etc_message
task confdir
# if the config space is a local directory, reset $FAI
- local method=$(expr match "$FAI_CONFIG_SRC" '\([^+]*\).*://')
- if [ $method = "file" ]; then
- local localpath=$(expr match "$FAI_CONFIG_SRC" '.*://\(/.*\)')
- export FAI=$localpath
+ if [ -n "$FAI_CONFIG_SRC" ]; then
+ local method=$(expr match "$FAI_CONFIG_SRC" '\([^+]*\).*://')
+ if [ $method = "file" ]; then
+ local localpath=$(expr match "$FAI_CONFIG_SRC" '.*://\(/.*\)')
+ export FAI=$localpath
+ fi
fi
task setup
task defclass
More information about the Fai-commit
mailing list