X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=test%2Ftest-functions;h=901ff4860541db194a73ff703e10f9840b55f7d0;hp=34af32a7982a443979b4eec064f392e01366a001;hb=b6f0c419e38a960873fe68bf8f89bbb0268eed02;hpb=cffae62bcb6912fbaf1b7b282d9d170c9d308897 diff --git a/test/test-functions b/test/test-functions index 34af32a79..901ff4860 100644 --- a/test/test-functions +++ b/test/test-functions @@ -13,7 +13,7 @@ if ! ROOTLIBDIR=$(pkg-config --variable=systemdutildir systemd); then fi BASICTOOLS="sh bash setsid loadkeys setfont login sulogin gzip sleep echo mount umount cryptsetup date dmsetup modprobe" -DEBUGTOOLS="df free ls stty cat ps ln ip route dmesg dhclient mkdir cp ping dhclient strace less grep id tty touch du sort" +DEBUGTOOLS="df free ls stty cat ps ln ip route dmesg dhclient mkdir cp ping dhclient strace less grep id tty touch du sort hostname" function find_qemu_bin() { # SUSE and Red Hat call the binary qemu-kvm @@ -42,6 +42,14 @@ function find_qemu_bin() { } run_qemu() { + if [ -f /etc/machine-id ]; then + read MACHINE_ID < /etc/machine-id + [ -z "$INITRD" ] && [ -e "/boot/$MACHINE_ID/$KERNEL_VER/initrd" ] \ + && INITRD="/boot/$MACHINE_ID/$KERNEL_VER/initrd" + [ -z "$KERNEL_BIN" ] && [ -e "/boot/$MACHINE_ID/$KERNEL_VER/linux" ] \ + && KERNEL_BIN="/boot/$MACHINE_ID/$KERNEL_VER/linux" + fi + [ "$KERNEL_BIN" ] || KERNEL_BIN=/boot/vmlinuz-$KERNEL_VER [ "$INITRD" ] || INITRD=/boot/initramfs-${KERNEL_VER}.img [ "$QEMU_SMP" ] || QEMU_SMP=1 @@ -137,8 +145,8 @@ create_empty_image() { LOOPDEV=$(losetup --show -P -f $TESTDIR/rootdisk.img) [ -b "$LOOPDEV" ] || return 1 echo "LOOPDEV=$LOOPDEV" >> $STATEFILE - sfdisk -C 9600 -H 2 -S 32 -L "$LOOPDEV" <&1 >/dev/null |sed -n '/calling init: .*libnss_/ {s!^.* /!/!; p}') - for l in $NSS_LIBS; do - dracut_install $l - done + dracut_install $NSS_LIBS } install_dbus() {