scripts/live: Make 'nopersistent' parameter actually disable persistence
authorChris Lamb <chris@chris-lamb.co.uk>
Wed, 26 Mar 2008 07:50:42 +0000 (07:50 +0000)
committerDaniel Baumann <daniel@debian.org>
Wed, 9 Mar 2011 16:47:58 +0000 (17:47 +0100)
scripts/live

index 03905b5..7632fc8 100755 (executable)
@@ -992,7 +992,7 @@ setup_unionfs ()
        mkdir -p /cow
 
        # Looking for "${root_persistence}" device or file
-       if [ -n "${PERSISTENT}" ]
+       if [ -n "${PERSISTENT}" ] && [ -z "${NOPERSISTENT}" ]
        then
                cowprobe=$(find_cow_device "${root_persistence}")
 
@@ -1005,7 +1005,7 @@ setup_unionfs ()
                        cowdevice="tmpfs"
                        cow_fstype="tmpfs"
                fi
-       elif [ -n "${NFS_COW}" ]
+       elif [ -n "${NFS_COW}" ] && [ -z "${NOPERSISTENT}" ]
        then
                # check if there are any nfs options
                if echo ${NFS_COW}|grep -q ','
@@ -1075,7 +1075,7 @@ setup_unionfs ()
        mount -t tmpfs tmpfs ${rootmnt}/live
 
        # Adding other custom mounts
-       if [ -n "${PERSISTENT}" ]
+       if [ -n "${PERSISTENT}" ] && [ -z "${NOPERSISTENT}" ]
        then
                # directly mount /home
                # FIXME: add a custom mounts configurable system