git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Check for ocaml-xml-light-devel (xml-light.cmxa)
[libguestfs.git]
/
appliance
/
libguestfs-supermin-helper.in
diff --git
a/appliance/libguestfs-supermin-helper.in
b/appliance/libguestfs-supermin-helper.in
index
2afd0cf
..
a096ea4
100755
(executable)
--- a/
appliance/libguestfs-supermin-helper.in
+++ b/
appliance/libguestfs-supermin-helper.in
@@
-33,15
+33,19
@@
initrd="$3"
# Look for the most recent kernel named vmlinuz-*.<arch>* which has a
# corresponding directory in /lib/modules/. If the architecture is x86, look
# for any x86 kernel.
# Look for the most recent kernel named vmlinuz-*.<arch>* which has a
# corresponding directory in /lib/modules/. If the architecture is x86, look
# for any x86 kernel.
+#
+# RHEL 5 didn't append the arch to the kernel name, so look for kernels
+# without arch second.
arch=$(echo "@host_cpu@" | sed 's/^i.86$/i?86/')
arch=$(echo "@host_cpu@" | sed 's/^i.86$/i?86/')
-for f in $(ls -1vr /boot/vmlinuz-*.$arch* 2>/dev/null | grep -v xen); do
+kernels=$(ls -1vr /boot/vmlinuz-*.$arch* 2>/dev/null | grep -v xen; ls -1vr /boot/vmlinuz-* 2>/dev/null | grep -v xen)
+for f in $kernels; do
b=$(basename "$f")
b=$(echo "$b" | sed 's,vmlinuz-,,')
modpath="/lib/modules/$b"
if [ -d "$modpath" ]; then
b=$(basename "$f")
b=$(echo "$b" | sed 's,vmlinuz-,,')
modpath="/lib/modules/$b"
if [ -d "$modpath" ]; then
- ln -sf "$f" "$kernel"
- break
+
ln -sf "$f" "$kernel"
+
break
fi
modpath=
done
fi
modpath=
done