#!/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" kernelimg=$(grep module ${filename} | tail -1 || true) if [ $SCENARIO == shared ];then cat>"${filename}"<"${filename}"<"${filename}"<"${filename}"<