1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
#! /bin/bash
set -e
. ./debian/tests/common.sh
cd "$AUTOPKGTEST_TMP"
trap "cp -vp /var/log/fai/fai-make-nfsroot.log nfsroot.log $AUTOPKGTEST_ARTIFACTS" INT QUIT EXIT
fai-make-nfsroot -zgv > nfsroot.log
err=$?
echo "exit code fai-make-nfsroot: $err"
if [ $err -ne 0 ]; then
error "ERROR: fai-make-nfsroot exit code $err"
fi
# test the results of the commands called
chk-size $N 750
grep 'fai-make-nfsroot finished properly.' nfsroot.log || error "fai-make-nfsroot error."
egrep '^Calling debootstrap ' nfsroot.log
egrep ^fai-nfsroot nfsroot.log
egrep ^dracut-network nfsroot.log || error "package dracut-network is missing."
chk-file $TFTP/pxelinux.0
chk-file $TFTP/syslinux.efi
chk-file $TFTP/ldlinux.e64
chk-size $N/boot/initrd.img* 40
chk-no-file $N/etc/udev/rules.d/70-persistent-net.rules
initrd=$(chroot $N readlink -f /initrd.img)
chroot $N /usr/bin/lsinitrd -m $initrd | grep livenet || error "livenet mising"
chroot $N /usr/bin/lsinitrd $initrd | grep mount.nfs || error "mount.nfs missing"
# - - - - - - - - - - - - - - - - -
# fai-chboot
# currently fai-chboot writes to stderr
fai-chboot -o default 2>/dev/null
fai-chboot -Iv -f verbose,sshd,createvt,menu -u nfs://faiserver/$CS test.tmpl 2>/dev/null
fai-chboot -Iv -f verbose,sshd,createvt,menu -u nfs://faiserver/$CS localhost 2>/dev/null
chk-file $TFTP/pxelinux.cfg/default
chk-file $TFTP/pxelinux.cfg/test.tmpl
chk-file $TFTP/pxelinux.cfg/7F000001
|