#!/bin/bash #* Copyright (c) 2020 Intel Corporation SPDX-License-Identifier: BSD-3-Clause # postinst script for acrn-hypervisor # please NOTE !!! scenario_info/board_info changed by python scripts, so do not add content there!!! # please NOTE !!! scenario_info/board_info please add in release.json if needed !!! set -e #Build info Start SCENARIO=(shared) BOARD=(nuc11tnbi5) #Build info End ACRNBIN="/boot/acrn.${SCENARIO}.${BOARD}.bin" type=$(lsblk -l |awk '$NF == "/" {print $1}') pattern='^/dev/.* UUID="([^"]+)".* PARTUUID="([^"]+)"' while IFS= read -r line; do if [[ $line =~ $pattern ]]; then uuid="${BASH_REMATCH[1]}" partuuid="${BASH_REMATCH[2]}" fi done < <(blkid |grep ext4 |grep ${type}) filename="/etc/grub.d/40_custom" if ls /boot/vmlinuz*acrn-service-vm* 1> /dev/null 2>&1;then service_vm_kernel=$(ls -tr /boot/vmlinuz-*acrn-service-vm* | tail -1) else service_vm_kernel=$(ls /boot/vmlinuz-* | tail -1) fi kernelimg="module2 $service_vm_kernel Linux_bzImage" if [ $SCENARIO == shared ];then cat>"${filename}"<"${filename}"<"${filename}"<"${filename}"<