[Fai-commit] r3875 - in trunk: bin lib
fai-commit at lists.alioth.debian.org
fai-commit at lists.alioth.debian.org
Wed Sep 6 15:15:07 UTC 2006
Author: lange
Date: 2006-09-06 15:15:06 +0000 (Wed, 06 Sep 2006)
New Revision: 3875
Modified:
trunk/bin/fai
trunk/lib/subroutines-linux
Log:
do not copy sources.lsit from /etc/fai, use $FAI_ETC_DIR (specified by fai -c)
Modified: trunk/bin/fai
===================================================================
--- trunk/bin/fai 2006-09-06 14:00:07 UTC (rev 3874)
+++ trunk/bin/fai 2006-09-06 15:15:06 UTC (rev 3875)
@@ -43,12 +43,11 @@
set -a # now export all variables
umask 022
- if [ ! -d "$cfdir" ]; then
- echo "$cfdir is not a directory"
+ if [ ! -d "$FAI_ETC_DIR" ]; then
+ echo "$FAI_ETC_DIR is not a directory"
exit 6
fi
- [ -f $cfdir/fai.conf ] && . $cfdir/fai.conf
- unset cfdir
+ [ -f $FAI_ETC_DIR/fai.conf ] && . $FAI_ETC_DIR/fai.conf
if [ -f /boot/RUNNING_FROM_FAICD ]; then # we are booting from fai cd
umount /initrd
@@ -150,7 +149,7 @@
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Main routine
-cfdir=/etc/fai
+FAI_ETC_DIR=/etc/fai
# Parse commandline options
TEMP=$(getopt -o Nhvc:C: --long new,help,verbose,class:,cfdir: -n "$0" -- "$@")
if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi
@@ -174,7 +173,7 @@
;;
-c|--cfdir)
shift
- cfdir=$1
+ FAI_ETC_DIR=$1
shift
;;
-C|--class)
@@ -209,7 +208,7 @@
exit 3
fi
- eval $(grep NFSROOT= $cfdir/make-fai-nfsroot.conf)
+ eval $(grep NFSROOT= $FAI_ETC_DIR/make-fai-nfsroot.conf)
export NFSROOT
export FAI_ROOT=$targetdir
fi
Modified: trunk/lib/subroutines-linux
===================================================================
--- trunk/lib/subroutines-linux 2006-09-06 14:00:07 UTC (rev 3874)
+++ trunk/lib/subroutines-linux 2006-09-06 15:15:06 UTC (rev 3875)
@@ -168,7 +168,7 @@
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
### BEGIN SUBROUTINE INFO
# Provides-Var: none
-# Requires-Var: $FAI_ROOT
+# Requires-Var: $FAI_ROOT $FAI_ETC_DIR
# Suggests-Var: $IPADDR $DOMAIN
# Short-Description: <task desc.>
### END SUBROUTINE INFO
@@ -186,7 +186,7 @@
grep -q $IPADDR $FAI_ROOT/etc/hosts 2>/dev/null || echo -e "$IPADDR\t$HOSTNAME.$DOMAIN $HOSTNAME" >>$FAI_ROOT/etc/hosts
fi
fi
- [ -d /etc/apt ] && cp -r /etc/apt/* $FAI_ROOT/etc/apt/
+ [ -d $FAI_ETC_DIR/apt ] && cp -r $FAI_ETC_DIR/apt/* $FAI_ROOT/etc/apt/
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
task_updatebase() {
More information about the Fai-commit
mailing list