-export LC_COLLATE=C
-
-COMMAND="$1"
-KERNEL_VERSION="$2"
-KERNEL_IMAGE="$3"
-
-[[ -f /etc/os-release ]] && . /etc/os-release
-if ! [[ $ID ]]; then
- echo "Can't determine the name of your distribution. Please create /etc/os-release." >&2
- echo "See http://www.freedesktop.org/software/systemd/man/os-release.html" >&2
- exit 1
-fi
-
-[[ -f /etc/machine-id ]] && read MACHINE_ID < /etc/machine-id
-if ! [[ $MACHINE_ID ]]; then
- echo "Can't determine your machine id. Please create /etc/machine-id!" >&2
- echo "See http://www.freedesktop.org/software/systemd/man/machine-id.html" >&2
- exit 1
-fi
-
-if [[ -f /etc/kernel/cmdline ]]; then
- readarray -t BOOT_OPTIONS < /etc/kernel/cmdline
-fi
-
-if ! [[ "${BOOT_OPTIONS[@]}" ]]; then
- readarray -t BOOT_OPTIONS < /proc/cmdline
-fi
-
-if ! [[ $BOOT_OPTIONS ]]; then
- echo "Can't determine the kernel command line parameters." >&2
- echo "Please specify the kernel command line in /etc/kernel/cmdline!" >&2
- exit 1
-fi
-