mirror of
https://github.com/lxsang/meta-rpi-diya.git
synced 2024-12-29 11:58:22 +01:00
15 lines
279 B
Plaintext
15 lines
279 B
Plaintext
|
#! /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
|
||
|
initramfs recovery-${MACHINE}.cpio.gz followkernel
|
||
|
EOF
|
||
|
echo "Rebooting to recovery mode"
|
||
|
reboot
|