4
0
raspi-alpine-builder/resources/scripts/ab_active

12 lines
212 B
Plaintext
Raw Normal View History

2019-12-01 21:20:32 +01:00
#!/bin/bash
2019-11-03 16:04:17 +01:00
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