Richard W.M. Jones
2009-Dec-04 15:41 UTC
[Libguestfs] [PATCH] appliance: Fix code which gets list of kernels.
-- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 80 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora -------------- next part -------------->From 1b289ce96bde557cf3706aa7417641355aa78f20 Mon Sep 17 00:00:00 2001From: Matthew Booth <mbooth at redhat.com> Date: Fri, 4 Dec 2009 15:38:09 +0000 Subject: [PATCH] appliance: Fix code which gets list of kernels. The first 'ls' command was failing, so the second 'ls' command would never run at all. --- appliance/libguestfs-supermin-helper.in | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/appliance/libguestfs-supermin-helper.in b/appliance/libguestfs-supermin-helper.in index 4d8fd04..ab3aad5 100755 --- a/appliance/libguestfs-supermin-helper.in +++ b/appliance/libguestfs-supermin-helper.in @@ -38,7 +38,10 @@ initrd="$3" # without arch second. arch=$(echo "@host_cpu@" | sed 's/^i.86$/i?86/') -kernels=$(ls -1dvr /boot/vmlinuz-*.$arch* 2>/dev/null | grep -v xen; ls -1dvr /boot/vmlinuz-* 2>/dev/null | grep -v xen) +kernels=$( + ls -1dvr /boot/vmlinuz-*.$arch* 2>/dev/null | grep -v xen ||: ; + ls -1dvr /boot/vmlinuz-* 2>/dev/null | grep -v xen +) if [ -z "$kernels" ]; then echo "$0: failed to find a suitable kernel in /boot directory" >&2 -- 1.6.5.2
Seemingly Similar Threads
- [PATCH] appliance: Set $PATH instead of hard-coding paths to binaries everywhere.
- [PATCH] appliance: Remove repo from appliance filename (RHBZ#638901).
- [PATCH] Use the noop scheduler inside the appliance.
- [PATCH 0/2] Use link-local addresses when communicating between appliance and host (RHBZ#588763)
- [virt-devel] End-user review of the native KVM tool