fix fw_setenv in first_boot, add first_boot enable/disbale in Recovery mode
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
This commit is contained in:
parent
f05e8aa1c0
commit
4f03f243eb
|
@ -233,7 +233,7 @@ copy_files_to_usb_partition
|
|||
|
||||
notif " FIRST BOOT SETUP FINISHED!"
|
||||
|
||||
setenv first_boot_ok 1
|
||||
fw_setenv first_boot_ok 1
|
||||
|
||||
sleep 1
|
||||
clear_notif
|
||||
|
|
|
@ -61,20 +61,32 @@ menu_display () {
|
|||
6)
|
||||
|
||||
# Factory tests enable/disable
|
||||
if [ -e /mnt/.assembly_tests ]; then
|
||||
message=" FACTORY TESTS DISABLE"
|
||||
RUN_ENV_VAR=$(fw_printenv -n assembly_tests 2>/dev/null)
|
||||
if [ "x${RUN_ENV_VAR}" == "x1" ]; then
|
||||
message=" FACTORY TESTS DISABLE"
|
||||
else
|
||||
message=" FACTORY TESTS ENABLE"
|
||||
message=" FACTORY TESTS ENABLE"
|
||||
fi
|
||||
;;
|
||||
|
||||
7)
|
||||
|
||||
# First boot enable/disable
|
||||
FIRST_BOOT_OK_ENV_VAR=$(fw_printenv -n first_boot_ok 2>/dev/null)
|
||||
if [ "x${FIRST_BOOT_OK_ENV_VAR}" == "x1" ]; then
|
||||
message=" FIRST BOOT DISABLE"
|
||||
else
|
||||
message=" FACTORY TESTS ENABLE"
|
||||
fi
|
||||
;;
|
||||
|
||||
8)
|
||||
|
||||
# Exit Recovery
|
||||
message=" EXIT RECOVERY"
|
||||
;;
|
||||
|
||||
8)
|
||||
9)
|
||||
|
||||
# Shutdown
|
||||
message=" SHUTDOWN"
|
||||
|
@ -225,22 +237,36 @@ menu_run () {
|
|||
|
||||
# Factory tests enable/disable
|
||||
RUN_ENV_VAR=$(fw_printenv -n assembly_tests 2>/dev/null)
|
||||
if [ "x${RUN_ENV_VAR}" == "x1" ]; then
|
||||
fw_setenv assembly_tests 0
|
||||
message=" FACTORY TESTS ENABLE"
|
||||
else
|
||||
fw_setenv assembly_tests 1
|
||||
message=" FACTORY TESTS DISABLE"
|
||||
fi
|
||||
notif "${message}"
|
||||
if [ "x${RUN_ENV_VAR}" == "x1" ]; then
|
||||
fw_setenv assembly_tests 0
|
||||
message=" FACTORY TESTS ENABLE"
|
||||
else
|
||||
fw_setenv assembly_tests 1
|
||||
message=" FACTORY TESTS DISABLE"
|
||||
fi
|
||||
notif "${message}"
|
||||
;;
|
||||
|
||||
7)
|
||||
|
||||
# First boot enable/disable
|
||||
FIRST_BOOT_OK_ENV_VAR=$(fw_printenv -n first_boot_ok 2>/dev/null)
|
||||
if [ "x${FIRST_BOOT_OK_ENV_VAR}" == "x1" ]; then
|
||||
fw_setenv first_boot_ok
|
||||
message=" FIRST BOOT ENABLE"
|
||||
else
|
||||
fw_setenv first_boot_ok 1
|
||||
message=" FIRST BOOT DISABLE"
|
||||
fi
|
||||
notif "${message}"
|
||||
;;
|
||||
|
||||
8)
|
||||
notif "^^^^^^^^ RESTARTING...^^^^^^^^"
|
||||
normal_mode
|
||||
;;
|
||||
|
||||
8)
|
||||
9)
|
||||
notif "^^^^^^^^ SHUTDOWN...^^^^^^^^"
|
||||
poweroff
|
||||
;;
|
||||
|
|
Loading…
Reference in New Issue