-if grep -q -- 'FAI_DEBOOTSTRAP_OPTS.*--arch' "$NFSROOT_CONF" ; then
- sed "s/--arch [a-z0-9]* /--arch $ARCH /" "$NFSROOT_CONF" | sponge "$NFSROOT_CONF"
-else
- sed "s|^FAI_DEBOOTSTRAP_OPTS=\"\(.*\)|FAI_DEBOOTSTRAP_OPTS=\"--arch $ARCH \1|" "$NFSROOT_CONF" | sponge "$NFSROOT_CONF"
+# generate nfsroot configuration for FAI on the fly
+if [ -z "$FAI_DEBOOTSTRAP" ] ; then
+ FAI_DEBOOTSTRAP="$SUITE http://http.debian.net/debian"
+fi
+
+if [ -z "$FAI_DEBOOTSTRAP_OPTS" ] ; then
+ FAI_DEBOOTSTRAP_OPTS="--exclude=info,tasksel,tasksel-data --include=aptitude --arch $ARCH"
+fi
+
+# create backup of old (not yet automatically generated) config file
+if [ -f "${GRML_FAI_CONFIG}/make-fai-nfsroot.conf" ] ; then
+ if ! grep -q 'This is an automatically generated file by grml-live' "${GRML_FAI_CONFIG}/make-fai-nfsroot.conf" ; then
+ ewarn "Found old ${GRML_FAI_CONFIG}/make-fai-nfsroot.conf - moving to ${GRML_FAI_CONFIG}/make-fai-nfsroot.conf.outdated"
+ mv "${GRML_FAI_CONFIG}/make-fai-nfsroot.conf" "${GRML_FAI_CONFIG}/make-fai-nfsroot.conf.outdated"
+ eend $?
+ fi