Unverified Commit d0894c52 authored by Michal Hrusecky's avatar Michal Hrusecky 🦎

cert-backup: Use mtd only if there is no btrfs

parent d68620ad
......@@ -36,10 +36,10 @@ mkdir "$WORKDIR"
trap "umount -fl '$WORKDIR' || true; rmdir '$WORKDIR' || true" EXIT INT QUIT TERM ABRT
test -z "$(ls -A "$WORKDIR")"
if test -b "$PARTITION"; then
MMC="$(sed -n 's|\(/dev/mmcblk[01]p1\) / btrfs.*|\1|p')"
if [ -z "$MMC" ] && [ -b "$PARTITION" ]; then
mount -t jffs2 -o compr=none "$PARTITION" "$WORKDIR"
else
MMC="$(sed -n 's|\(/dev/mmcblk[01]p1\) / btrfs.*|\1|p')"
if [ -n "$MMC" ] && \
! btrfs subvol list / | grep -q "path $SUBVOL"; then
mount -t btrfs -o subvol=/ "$MMC" "$WORKDIR"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment