1
0
mirror of https://github.com/lxsang/meta-rpi-diya.git synced 2024-11-08 14:38:21 +01:00
meta-rpi-diya/recipes-diya/diya-overlay/files/boot-to-recovery

15 lines
277 B
Plaintext
Raw Normal View History

2023-08-02 09:51:33 +02:00
#! /bin/sh
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
echo "$0 shall be run as root"
exit 1
fi
. /etc/profile
# prepare env for recovery boot
cat << EOF > /boot/extraconfig.txt
2023-08-02 10:13:00 +02:00
initramfs recovery-$MACHINE.cpio.gz followkernel
2023-08-02 09:51:33 +02:00
EOF
echo "Rebooting to recovery mode"
reboot