/ scripts / bootupctl-shim
bootupctl-shim
 1  #!/bin/bash
 2  
 3  if [[ $# -ge 2 ]]; then
 4  	if [[ "$1" == "backend" && "$2" == "install" ]]; then
 5  		# BASH_ARGV[0] is the last argument. In the case of bootupctl backend install, it's the path to the target
 6  		# root directory.
 7  		echo "Copying Raspberry Pi firmware files to ${BASH_ARGV[0]}/boot/efi/" >&2
 8  		cp -av /usr/lib/bootc-raspi-firmwares/. "${BASH_ARGV[0]}"/boot/efi/
 9  		echo "Copying Raspberry Pi firmware files finished" >&2
10  	fi
11  fi
12  
13  exec /usr/bin/bootupctl-orig/bootupctl "$@"