added A/B partition update
This commit is contained in:
11
resources/scripts/ab_active
Executable file
11
resources/scripts/ab_active
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# get current partition index
|
||||
current_idx=$(rdev | sed 's#/dev/mmcblk0p\([^ ]*\).*#\1#')
|
||||
|
||||
if [ $current_idx -eq 2 ]; then
|
||||
echo "Active partition: A"
|
||||
else
|
||||
echo "Active partition: B"
|
||||
fi
|
Reference in New Issue
Block a user