-if grep -q -- 'FAI_DEBOOTSTRAP_OPTS.*--arch' /etc/grml/fai/make-fai-nfsroot.conf || \
- [ "$(dpkg --print-architecture)" != "$ARCH" ] ; then
- sed -i "s|FAI_DEBOOTSTRAP_OPTS=\"\(.*\)|FAI_DEBOOTSTRAP_OPTS=\"--arch $ARCH \1|" /etc/grml/fai/make-fai-nfsroot.conf
+[ -n "$ARCH" ] || ARCH="$(dpkg --print-architecture)"
+if grep -q -- 'FAI_DEBOOTSTRAP_OPTS.*--arch' $NFSROOT_CONF ; then
+ sed -i "s/--arch [a-z0-9]* /--arch $ARCH /" $NFSROOT_CONF
+else
+ sed -i "s|FAI_DEBOOTSTRAP_OPTS=\"\(.*\)|FAI_DEBOOTSTRAP_OPTS=\"--arch $ARCH \1|" $NFSROOT_CONF