Initial commit

This commit is contained in:
DanyLE
2025-03-05 19:53:19 +01:00
parent 05bb55c837
commit a4637ec44b
46 changed files with 1829 additions and 0 deletions

View File

@ -0,0 +1,21 @@
#! /bin/sh
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
echo "$0 shall be run as root"
exit 1
fi
. /etc/profile
if [ ! -e /boot/config.txt ]; then
# prepare env for recovery boot
cat << EOF > /boot/config.txt
recovery=true
recovery_image=recovery-${MACHINE}.cpio.gz
EOF
else
sed -i 's/^.*recovery.*/recovery=true/g' /boot/config.txt || \
echo "recovery=true" >> /boot/config.txt
fi
echo "Rebooting to recovery mode"
reboot