X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=components%2F0020-read-only;h=a2c86ef09fd096dd0e8d8fd4e7232e373c1ca397;hb=f0db64b1351c5f097687cc0ebcdf3724186f4c4f;hp=fc0dde0cc7eb5dd240093febcd3c0e21a81ffcc7;hpb=a6e250845a22f7b54e2936a64e98430ed3c79194;p=live-boot-grml.git diff --git a/components/0020-read-only b/components/0020-read-only index fc0dde0..a2c86ef 100755 --- a/components/0020-read-only +++ b/components/0020-read-only @@ -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 + }