2022-07-23 10:02:29 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# GPL-3.0-or-later
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
# Declare used deviceinfo variables to pass shellcheck
|
|
|
|
deviceinfo_cgpt_kpart=""
|
|
|
|
|
|
|
|
# shellcheck disable=SC1091
|
|
|
|
. /etc/deviceinfo
|
|
|
|
|
2023-05-09 13:56:02 +00:00
|
|
|
# shellcheck disable=SC2013
|
|
|
|
for x in $(cat /proc/cmdline); do
|
|
|
|
[ "$x" = "${x#kern_guid=}" ] && continue
|
|
|
|
GUID="${x#kern_guid=}"
|
|
|
|
partition=$(findfs PARTUUID="$GUID")
|
|
|
|
echo "Flashing $deviceinfo_cgpt_kpart to $partition"
|
|
|
|
dd if="$deviceinfo_cgpt_kpart" of="$partition"
|
|
|
|
done
|
2022-07-23 10:02:29 +00:00
|
|
|
|
|
|
|
echo "Done."
|