mirror of
https://github.com/systemd/systemd.git
synced 2025-02-02 13:47:27 +03:00
tests: fix initrd searching on Debian/Ubuntu
This commit is contained in:
parent
fd4f59076e
commit
61fea35e14
@ -36,7 +36,7 @@ you can even skip the "clean" and "setup" if you want to run the machine again.
|
|||||||
$ sudo make KERNEL_APPEND="systemd.unit=multi-user.target" run
|
$ sudo make KERNEL_APPEND="systemd.unit=multi-user.target" run
|
||||||
|
|
||||||
You can specify a different kernel and initramfs with $KERNEL_BIN and $INITRD.
|
You can specify a different kernel and initramfs with $KERNEL_BIN and $INITRD.
|
||||||
(Fedora's default kernel path and initramfs are used by default)
|
(Fedora's or Debian's default kernel path and initramfs are used by default)
|
||||||
|
|
||||||
$ sudo make KERNEL_BIN=/boot/vmlinuz-foo INITRD=/boot/initramfs-bar clean check
|
$ sudo make KERNEL_BIN=/boot/vmlinuz-foo INITRD=/boot/initramfs-bar clean check
|
||||||
|
|
||||||
|
@ -51,8 +51,11 @@ run_qemu() {
|
|||||||
&& KERNEL_BIN="/boot/$MACHINE_ID/$KERNEL_VER/linux"
|
&& KERNEL_BIN="/boot/$MACHINE_ID/$KERNEL_VER/linux"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
default_fedora_initrd=/boot/initramfs-${KERNEL_VER}.img
|
||||||
|
default_debian_initrd=/boot/initrd.img-${KERNEL_VER}
|
||||||
[ "$KERNEL_BIN" ] || KERNEL_BIN=/boot/vmlinuz-$KERNEL_VER
|
[ "$KERNEL_BIN" ] || KERNEL_BIN=/boot/vmlinuz-$KERNEL_VER
|
||||||
[ "$INITRD" ] || INITRD=/boot/initramfs-${KERNEL_VER}.img
|
[ "$INITRD" ] || { [ -e "$default_fedora_initrd" ] && INITRD=$default_fedora_initrd; }
|
||||||
|
[ "$INITRD" ] || { [ "$LOOKS_LIKE_DEBIAN" ] && [ -e "$default_debian_initrd" ] && INITRD=$default_debian_initrd; }
|
||||||
[ "$QEMU_SMP" ] || QEMU_SMP=1
|
[ "$QEMU_SMP" ] || QEMU_SMP=1
|
||||||
|
|
||||||
find_qemu_bin || return 1
|
find_qemu_bin || return 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user