2 # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
3 # ex: ts=8 sw=4 sts=4 et filetype=sh
5 if [[ -f /etc/kernel/cmdline ]]; then
6 readarray -t BOOT_OPTIONS < /etc/kernel/cmdline
9 if ! [[ "${BOOT_OPTIONS[@]}" ]]; then
10 readarray -t BOOT_OPTIONS < /proc/cmdline
13 unset noimageifnotneeded
15 for ((i=0; i < "${#BOOT_OPTIONS[@]}"; i++)); do
16 if [[ ${BOOT_OPTIONS[$i]} == root\=PARTUUID\=* ]]; then
17 noimageifnotneeded="yes"
25 dracut ${noimageifnotneeded+--noimageifnotneeded} "$3"/initrd "$2"