Skip to content

Commit e06ba0c

Browse files
committed
fix: LX01 switch partition play
1 parent d3f6007 commit e06ba0c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

bin/play_button

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,10 @@ while is_button_pressed; do
7777
echo "Disabling OTA reboot"
7878
write_misc -o 0
7979
else
80-
echo "Switching last success partition"
81-
write_misc -l `read_misc boot_rootfs`
80+
bootpart=`read_misc boot_rootfs`
81+
[ "$bootpart" = "0" ] && bootpart="1" || bootpart="0"
82+
echo "Switching last success partition to $bootpart"
83+
write_misc -l $bootpart
8284
fi
8385
else
8486
bootpart="boot0"

0 commit comments

Comments
 (0)