summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2009-02-20 15:54:20 +0100
committerDaniel Baumann <daniel@debian.org>2011-03-09 17:48:04 +0100
commitce0b33407eac1411ab2ca7b9e985f39e2561b098 (patch)
treee7bf6a67c402af5466bf8a72d3490efc4aa64e95
parentaa17818806c1325138114311ba78cd08b0864d0a (diff)
downloadlive-boot-ce0b33407eac1411ab2ca7b9e985f39e2561b098.tar.gz
live-boot-ce0b33407eac1411ab2ca7b9e985f39e2561b098.zip
Only snapshotting in initscript when we actually run with persistence.
-rw-r--r--debian/live-initramfs.init17
1 files changed, 11 insertions, 6 deletions
diff --git a/debian/live-initramfs.init b/debian/live-initramfs.init
index 4cf767a..2082a2b 100644
--- a/debian/live-initramfs.init
+++ b/debian/live-initramfs.init
@@ -95,14 +95,19 @@ device_is_USB_flash_drive()
do_stop ()
{
- if [ ! -z "${ROOTSNAP}" ]
+ if ! grep -qs nopersistent /proc/cmdline && grep -qs persistent /proc/cmdline
then
- ${DO_SNAPSHOT} --resync-string="${ROOTSNAP}"
- fi
+ if [ ! -z "${ROOTSNAP}" ]
+ then
+ ${DO_SNAPSHOT} --resync-string="${ROOTSNAP}"
+ fi
- if [ ! -z "${HOMESNAP}" ]
- then
- ${DO_SNAPSHOT} --resync-string="${HOMESNAP}"
+ if [ ! -z "${HOMESNAP}" ]
+ then
+ ${DO_SNAPSHOT} --resync-string="${HOMESNAP}"
+ fi
+ else
+ return 0
fi
# check for netboot