From: Daniel Baumann Date: Fri, 20 Feb 2009 14:54:20 +0000 (+0100) Subject: Only snapshotting in initscript when we actually run with persistence. X-Git-Tag: debian/2.0.15-1~342 X-Git-Url: http://git.grml.org/?a=commitdiff_plain;ds=sidebyside;h=ce0b33407eac1411ab2ca7b9e985f39e2561b098;hp=aa17818806c1325138114311ba78cd08b0864d0a;p=live-boot-grml.git Only snapshotting in initscript when we actually run with persistence. --- 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