a2cf97ec56
- lszcrypt fails when querying a specific domain (#2177613) - DASD autoquiesce support (#2196510) - zcrypt DD: AP command filtering (#2170362) - vmconvert and zgetdump consolidation (#2173925) - Support for List-Directed dump from ECKD DASD (#2159694) - Support for List-Directed IPL and re-IPL from ECKD DASD (#2159691) - Resolves: #2159698 #2177613 #2196510 #2170362 #2173925 #2159694 #2159691
49 lines
1.6 KiB
Bash
Executable File
49 lines
1.6 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
[[ -f /etc/os-release ]] && . /etc/os-release
|
|
[[ -f /etc/sysconfig/kernel ]] && . /etc/sysconfig/kernel
|
|
|
|
COMMAND="$1"
|
|
KERNEL_VERSION="$2"
|
|
BOOT_DIR_ABS="$3"
|
|
KERNEL_IMAGE="$4"
|
|
|
|
MACHINE_ID=$KERNEL_INSTALL_MACHINE_ID
|
|
|
|
BLS_DIR="/boot/loader/entries"
|
|
|
|
[[ "$KERNEL_VERSION" == *\+* ]] && flavor=-"${KERNEL_VERSION##*+}"
|
|
case "$COMMAND" in
|
|
add)
|
|
if [[ ! -f /sbin/new-kernel-pkg || -d "${BLS_DIR}" ]]; then
|
|
declare -a BOOT_OPTIONS
|
|
if [[ -f /etc/kernel/cmdline ]]; then
|
|
read -r -d '' -a BOOT_OPTIONS < /etc/kernel/cmdline
|
|
fi
|
|
|
|
if ! [[ ${BOOT_OPTIONS[*]} ]]; then
|
|
read -r -d '' -a line < /proc/cmdline
|
|
for i in "${line[@]}"; do
|
|
[[ "${i#initrd=*}" != "$i" ]] && continue
|
|
BOOT_OPTIONS+=("$i")
|
|
done
|
|
fi
|
|
|
|
if ! [[ ${BOOT_OPTIONS[*]} ]]; then
|
|
echo "Could not determine the kernel command line parameters." >&2
|
|
echo "Please specify the kernel command line in /etc/kernel/cmdline!" >&2
|
|
exit 1
|
|
fi
|
|
|
|
BLS_RESCUE="${BLS_DIR}/${MACHINE_ID}-0-rescue.conf"
|
|
if [[ -f "${BLS_RESCUE}" ]] && grep -q '^options.*$kernelopts' "${BLS_RESCUE}"; then
|
|
sed -i -e "s,^linux.*,linux /boot/vmlinuz-0-rescue-${MACHINE_ID},g" "${BLS_RESCUE}"
|
|
sed -i -e "s,^initrd.*,initrd /boot/initramfs-0-rescue-${MACHINE_ID}.img,g" "${BLS_RESCUE}"
|
|
sed -i -e "s#^options.*#options ${BOOT_OPTIONS[*]}#g" "${BLS_RESCUE}"
|
|
fi
|
|
fi
|
|
;;
|
|
*)
|
|
;;
|
|
esac
|