X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=scripts%2Flive;h=fd0da8ba0f1e7717ac38c42b8158719806e21395;hb=dee9ff7b470820bd9d1c541a25c9341b79a511f0;hp=7e0b100232a894d84665b497e22f4b0a87dc873f;hpb=3d5ce935a643cd8266b8f9e147723088bdff2800;p=live-boot-grml.git diff --git a/scripts/live b/scripts/live index 7e0b100..fd0da8b 100755 --- a/scripts/live +++ b/scripts/live @@ -326,6 +326,15 @@ Arguments () export PERSISTENT ;; + persistent=*) + PERSISTENT="${ARGUMENT#persistent=}" + if [ -z "${PERSISTENT}" ] + then + PERSISTENT="Yes" + fi + export PERSISTENT + ;; + nopersistent) NOPERSISTENT="Yes" export NOPERSISTENT @@ -881,7 +890,13 @@ find_snap () { # Look for ${snap_label}.* in block devices snap_label="${1}" - snapdata=$(find_files "${snap_label}.squashfs ${snap_label}.cpio.gz ${snap_label}.ext2 ${snap_label}.ext3 ${snap_label}.jffs2") + + if [ "${PERSISTENT}" != "nofiles" ] + then + # search for image files + snapdata=$(find_files "${snap_label}.squashfs ${snap_label}.cpio.gz ${snap_label}.ext2 ${snap_label}.ext3 ${snap_label}.jffs2") + fi + if [ -z "${snapdata}" ] then snapdata=$(find_cow_device "${snap_label}") @@ -1136,11 +1151,20 @@ setup_unionfs () # snapshots to be sure to really store some e.g key config files, # but not on the same media blacklistdev="${cowprobe}" + PERSISTENCE_IS_ON="1" + export PERSISTENCE_IS_ON fi # homecow just mount something on /home, this should be generalized some way homecow=$(find_cow_device "${home_persistence}" "${blacklistdev}") + if [ -b "${homecow}" ] + then + PERSISTENCE_IS_ON="1" + export PERSISTENCE_IS_ON + fi root_snapdata=$(find_snap "${root_snapshot_label}" "${blacklistdev}") - # This second type should be removed when snapshot grow smarter + # This second type should be removed when snapshot will get smarter, + # hence when "/etc/live-snapshot*list" will be supported also by + # ext2|ext3|jffs2 snapshot types. home_snapdata=$(find_snap "${home_snapshot_label}" "${blacklistdev}") if [ -b "${cowprobe}" ]