diff options
author | Matthew Booth <mbooth@redhat.com> | 2009-12-04 15:38:09 +0000 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2009-12-07 11:13:12 +0000 |
commit | f025a9c41dca06452e03a7f0e55cda0b6764038c (patch) | |
tree | 98b0e2252719c8ce7c1e47f8baffaa5f25933b96 | |
parent | 9e5fabbe01c0964f7124595beec01dde836d93a6 (diff) | |
download | libguestfs-f025a9c41dca06452e03a7f0e55cda0b6764038c.tar.gz libguestfs-f025a9c41dca06452e03a7f0e55cda0b6764038c.tar.xz libguestfs-f025a9c41dca06452e03a7f0e55cda0b6764038c.zip |
appliance: Fix code which gets list of kernels.
The first 'ls' command was failing, so the second 'ls' command
would never run at all.
-rwxr-xr-x | 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 4d8fd04d..ab3aad53 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 |