diff options
| author | Daniel Baumann <daniel@debian.org> | 2009-02-20 15:54:20 +0100 |
|---|---|---|
| committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 17:48:04 +0100 |
| commit | ce0b33407eac1411ab2ca7b9e985f39e2561b098 (patch) | |
| tree | e7bf6a67c402af5466bf8a72d3490efc4aa64e95 | |
| parent | aa17818806c1325138114311ba78cd08b0864d0a (diff) | |
| download | live-boot-ce0b33407eac1411ab2ca7b9e985f39e2561b098.tar.gz live-boot-ce0b33407eac1411ab2ca7b9e985f39e2561b098.zip | |
Only snapshotting in initscript when we actually run with persistence.
| -rw-r--r-- | debian/live-initramfs.init | 17 |
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 |
