diff options
| author | Daniel Baumann <daniel@debian.org> | 2012-06-06 18:29:07 +0200 |
|---|---|---|
| committer | Daniel Baumann <daniel@debian.org> | 2012-06-06 18:43:56 +0200 |
| commit | e243babf191d5b42efe58e90e74a22bd8063be8d (patch) | |
| tree | d29c3630f8235f98395450b4b3c499580b1f625e /scripts/boot/persistence-excludes.sh | |
| parent | f04ab476c668ad513f1ec68beaa948a26c862e05 (diff) | |
| download | live-boot-e243babf191d5b42efe58e90e74a22bd8063be8d.tar.gz live-boot-e243babf191d5b42efe58e90e74a22bd8063be8d.zip | |
Dropping snapshot functionality, superseeded by awesome custom mount persistence.
See the following threads for more information:
* http://lists.debian.org/debian-live/2012/04/msg00110.html
* http://lists.debian.org/debian-live/2012/06/msg00039.html
Diffstat (limited to 'scripts/boot/persistence-excludes.sh')
| -rwxr-xr-x | scripts/boot/persistence-excludes.sh | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/scripts/boot/persistence-excludes.sh b/scripts/boot/persistence-excludes.sh deleted file mode 100755 index ee9521e..0000000 --- a/scripts/boot/persistence-excludes.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/sh - -#set -e - -persistence_exclude () -{ - # Persistence enhancer script - # This script saves precious time on slow persistence devices/image files - # and writes on flash based device. - # a tmpfs on $PERSTMP is mounted and directories listed in - # /etc/live-persistence.binds will be copied there and then bind mounted back. - - if [ -z "${PERSISTENCE}" ] || [ -n "${NOPERSISTENCE}" ] || [ -z "${PERSISTENCE_IS_ON}" ] || [ ! -f /root/etc/live-persistence.binds ] - then - return - fi - - # FIXME: stop hardcoding overloading of initramfs-tools functions - . /scripts/functions - . /lib/live/boot/initramfs-tools.sh - - dirs="$(sed -e '/^ *$/d' -e '/^#.*$/d' /root/etc/live-persistence.binds | tr '\n' '\0')" - if [ -z "${dirs}" ] - then - return - fi - - log_begin_msg "Moving persistence bind mounts" - - PERSTMP="/root/live/persistence-binds" - CPIO="/bin/cpio" - - if [ ! -d "${PERSTMP}" ] - then - mkdir -p "${PERSTMP}" - fi - - mount -t tmpfs tmpfs "${PERSTMP}" - - for dir in $(echo "${dirs}" | tr '\0' '\n') - do - if [ ! -e "/root/${dir}" ] && [ ! -L "/root/${dir}" ] - then - # directory do not exists, create it - mkdir -p "/root/${dir}" - elif [ ! -d "/root/${dir}" ] - then - # it is not a directory, skip it - break - fi - - # Copy previous content if any - cd "/root/${dir}" - find . -print0 | ${CPIO} -pumd0 "${PERSTMP}/${dir}" - cd "${OLDPWD}" - - # Bind mount it to origin - mount -o bind "${PERSTMP}/${dir}" "/root/${dir}" - done - - log_end_msg -} |
