- # homecow just mount something on /home, this should be generalized some way
- homecow=$(find_cow_device "${home_persistence}" "${blacklistdev}" "${whitelistdev}")
- if [ -b "${homecow}" ]
+
+ if echo ${PERSISTENT_METHOD} | grep -qw snapshot
+ then
+ snapshots="${root_snapshot_label} ${home_snapshot_label}"
+ fi
+
+
+ for media in $(find_persistent_media "${overlays}" "${snapshots}" "${blacklistdev}" "${whitelistdev}")
+ do
+ media="$(echo ${media} | tr ":" " ")"
+ case ${media} in
+ ${root_persistence}=*)
+ cowprobe="${media#*=}"
+ ;;
+ ${home_persistence}=*)
+ homecow="${media#*=}"
+ ;;
+ ${root_snapshot_label}=*)
+ root_snapdata="${media#*=}"
+ ;;
+ ${home_snapshot_label}=*)
+ # This second type should be removed when snapshot will get smarter,
+ # hence when "/etc/live-snapshot*list" will be supported also by
+ # ext2|ext3|ext4|jffs2 snapshot types.
+ home_snapdata="${media#*=}"
+ ;;
+ *)
+ ;;
+ esac
+ done
+
+ if [ -b "${cowprobe}" ] || [ -b "${homecow}" ]