+ENABLED=yes
+LABEL="old kernel"
+BINARY=vmlinuz_old.efi
+ARGS="root=/dev/sda2 ro add_efi_memmap"
+
+ARGS="initrd=@EFI_PLATFORM_PATH@\\initrd_old $ARGS"
+
+if is_yes "$ENABLED" ; then
+ if [ -e /boot/vmlinuz.old ] ; then
+ _kernel_filetype="$(file -k -L /boot/vmlinuz.old)"
+ else
+ _kernel_filetype="$(file -k -L /boot/vmlinuz)"
+ fi
+
+ if [ "${_kernel_filetype#*PE32 executable}" != "${_kernel_filetype}" ] ; then
+ # PE32 - 32 bit EFI stub
+ ARCH=ia32
+ verbose "Kernel with 32 bit EFI stub found at /boot/vmlinuz.old"
+ elif [ "${_kernel_filetype#*PE32+ executable}" != "${_kernel_filetype}" ] ; then
+ # PE32+ - 64 bit EFI stub
+ ARCH=x64
+ verbose "Kernel with 64 bit EFI stub found at /boot/vmlinuz.old"
+ else
+ msg "/boot/vmlinuz.old does not contain EFI stub"
+ ENABLED=no
+ fi
+fi
+
+install_files() {
+
+ update_file --missingok /boot/initrd.old initrd_old
+ update_file --missingok /boot/vmlinuz.old vmlinuz_old.efi
+}
+
+# vi: ft=sh