Commit e3cbd824 authored by Michael Prokop's avatar Michael Prokop Committed by Evgeni Golov

Enable write-mode for persistency related devices in readonly/forensic mode

parent ac5eb22c
......@@ -53,4 +53,20 @@ Read_only ()
;;
esac
done
if grep -qe persistence /proc/cmdline
then
printf " * Persistence mode enabled, searching for persistency related devices to unlock\n" >/dev/console
for label in custom-ov home-rw home-sn live-rw live-sn persistence
do
if blkid -t LABEL="$label" | grep -q '.'
then
device=$(blkid -t LABEL="$label" | awk -F: '{print $1}')
printf " - Setting device %-9s with label '%s' to write mode for persistence mode: " "$device" "$label" >/dev/console
blockdev --setrw $device && printf "done\n" >/dev/console || printf "failed\n" >/dev/console
fi
done
fi
}
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