X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=components%2F0020-read-only;h=f56b8cfa5904fd81c2b7fa0935dd96980b39975f;hb=683095685ccdd4175b75293540aabe239d03a6bb;hp=fc0dde0cc7eb5dd240093febcd3c0e21a81ffcc7;hpb=a331218718282c5496ff062a0f6aa55908224862;p=live-boot-grml.git diff --git a/components/0020-read-only b/components/0020-read-only index fc0dde0..f56b8cf 100755 --- a/components/0020-read-only +++ b/components/0020-read-only @@ -53,4 +53,20 @@ Read_only () ;; esac done + + if grep -qw 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 + }