90-loaderentry.install revision 6fd2ccc957f21a423e1457c66e53b1697944d72a
84e51726a38e133ca42d2f30f0668d3921b210cbLennart Poettering# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
84e51726a38e133ca42d2f30f0668d3921b210cbLennart Poettering# ex: ts=8 sw=4 sts=4 et filetype=sh
84e51726a38e133ca42d2f30f0668d3921b210cbLennart PoetteringLOADER_ENTRY="/boot/loader/entries/$MACHINE_ID-$KERNEL_VERSION.conf"
874ff7bf4d6fe693542209f127d23cd89adc499bLennart Poettering read -r -d '' -a BOOT_OPTIONS < /etc/kernel/cmdline
874ff7bf4d6fe693542209f127d23cd89adc499bLennart Poetteringif ! [[ ${BOOT_OPTIONS[*]} ]]; then
874ff7bf4d6fe693542209f127d23cd89adc499bLennart Poettering [[ "${i#initrd=*}" != "$i" ]] && continue
874ff7bf4d6fe693542209f127d23cd89adc499bLennart Poetteringif ! [[ ${BOOT_OPTIONS[*]} ]]; then
874ff7bf4d6fe693542209f127d23cd89adc499bLennart Poettering echo "Could not determine the kernel command line parameters." >&2
874ff7bf4d6fe693542209f127d23cd89adc499bLennart Poettering echo "Please specify the kernel command line in /etc/kernel/cmdline!" >&2
874ff7bf4d6fe693542209f127d23cd89adc499bLennart Poetteringcp "$KERNEL_IMAGE" "$BOOT_DIR_ABS/linux" &&
84e51726a38e133ca42d2f30f0668d3921b210cbLennart Poettering echo "Could not copy '$KERNEL_IMAGE to '$BOOT_DIR_ABS/linux'." >&2
84e51726a38e133ca42d2f30f0668d3921b210cbLennart Poettering echo "Could not create loader entry directory '${LOADER_ENTRY%/*}'." >&2
874ff7bf4d6fe693542209f127d23cd89adc499bLennart Poettering echo "Could not create loader entry '$LOADER_ENTRY'." >&2