changed toggle_boot to recovery_mode and normal_mode

Signed-off-by: Michel Stempin <michel.stempin@wanadoo.fr>
This commit is contained in:
Michel Stempin 2020-10-25 21:56:16 +01:00
parent 41b19ad672
commit 5a1276599c
2 changed files with 4 additions and 2 deletions

View File

@ -1,8 +1,9 @@
#!/bin/sh
sgdisk -A 1:toggle:2 -A 2:toggle:2 /dev/mmcblk0 >/dev/null 2>&1
sgdisk -A 1:set:2 -A 2:clear:2 /dev/mmcblk0 >/dev/null 2>&1
recovery=$(sgdisk -A 1:get:2 /dev/mmcblk0 | cut -d : -f3)
if [ ${recovery} -eq 1 ]; then
echo "Next boot will be in recovery mode"
else
echo "Next boot will be in normal mode"
fi
reboot

View File

@ -1,8 +1,9 @@
#!/bin/sh
sgdisk -A 1:toggle:2 -A 2:toggle:2 /dev/mmcblk0 >/dev/null 2>&1
sgdisk -A 1:clear:2 -A 2:set:2 /dev/mmcblk0 >/dev/null 2>&1
recovery=$(sgdisk -A 1:get:2 /dev/mmcblk0 | cut -d : -f3)
if [ ${recovery} -eq 1 ]; then
echo "Next boot will be in recovery mode"
else
echo "Next boot will be in normal mode"
fi
reboot