projects
/
platform
/
upstream
/
dracut.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f13deab
)
test/run-qemu: specify the kernel
author
Harald Hoyer
<harald@redhat.com>
Fri, 28 Jun 2013 08:21:42 +0000
(10:21 +0200)
committer
Harald Hoyer
<harald@redhat.com>
Fri, 28 Jun 2013 08:21:42 +0000
(10:21 +0200)
test/run-qemu
patch
|
blob
|
history
diff --git
a/test/run-qemu
b/test/run-qemu
index
667975f
..
00c2f6a
100755
(executable)
--- a/
test/run-qemu
+++ b/
test/run-qemu
@@
-14,4
+14,15
@@
$(lsmod | grep -q '^kqemu ') && BIN=/usr/bin/qemu && ARGS="-kernel-kqemu "
echo "Please install kvm or qemu." >&2
exit 1
}
-exec sudo $BIN $ARGS "$@"
+
+KVERSION=${KVERSION-$(uname -r)}
+
+[[ -f /etc/machine-id ]] && read MACHINE_ID < /etc/machine-id
+
+if [[ $MACHINE_ID ]] && ( [[ -d /boot/${MACHINE_ID} ]] || [[ -L /boot/${MACHINE_ID} ]] ); then
+ VMLINUZ="/boot/${MACHINE_ID}/$KVERSION/linux"
+else
+ VMLINUZ="/boot/vmlinuz-${KVERSION}"
+fi
+
+exec sudo $BIN $ARGS -kernel $VMLINUZ "$@"