Merge "Handle non-existing *generic kernel and initrd"
This commit is contained in:
commit
8a8bbb5673
1 changed files with 2 additions and 5 deletions
|
@ -158,11 +158,8 @@ function select_boot_kernel_initrd () {
|
|||
exit 1
|
||||
fi
|
||||
elif [ -f $TARGET_ROOT/etc/debian_version ]; then
|
||||
KERNEL=$(basename $(ls -1rv $BOOTDIR/vmlinuz*generic | head -1))
|
||||
RAMDISK=$(basename $(ls -1rv $BOOTDIR/initrd*generic | head -1))
|
||||
# in case files with "generic" suffix were not found, fall back to default
|
||||
KERNEL=${KERNEL:-$(basename $(ls -1rv $BOOTDIR/vmlinuz* | head -1))}
|
||||
RAMDISK=${RAMDISK:-$(basename $(ls -1rv $BOOTDIR/initrd* | head -1))}
|
||||
KERNEL=$(basename $(ls -1rv $BOOTDIR/vmlinuz*generic 2>/dev/null || ls -1rv $BOOTDIR/vmlinuz* | head -1))
|
||||
RAMDISK=$(basename $(ls -1rv $BOOTDIR/initrd*generic 2>/dev/null || ls -1rv $BOOTDIR/initrd* | head -1))
|
||||
elif [ -f $TARGET_ROOT/etc/SuSE-release ]; then
|
||||
KERNEL=$(basename $(readlink -e $BOOTDIR/vmlinuz))
|
||||
RAMDISK=$(basename $(readlink -e $BOOTDIR/initrd))
|
||||
|
|
Loading…
Reference in a new issue