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