From ce0b33407eac1411ab2ca7b9e985f39e2561b098 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 20 Feb 2009 15:54:20 +0100 Subject: [PATCH] Only snapshotting in initscript when we actually run with persistence. --- debian/live-initramfs.init | 17 +++++++++++------ 1 file 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 -- 2.1.4