Adding upstream version 2.0~a6.
[live-boot-grml.git] / bin / live-snapshot
index 18b067b..08e5fd6 100755 (executable)
@@ -4,7 +4,7 @@
 #
 #   This program mounts a device (fallback to /tmpfs under $MOUNTP
 #   and saves the /live/cow (or a different directory) filesystem in it
-#   for reuse in another live-initramfs session.
+#   for reuse in another live-boot session.
 #   Look at the manpage for more informations.
 #
 # Copyright (C) 2006-2008 Marco Amadori <marco.amadori@gmail.com>
@@ -40,7 +40,11 @@ fi
 . /usr/share/initramfs-tools/scripts/live-helpers
 
 LIVE_CONF="/etc/live.conf"
-. "${LIVE_CONF}"
+
+if [ -r "${LIVE_CONF}" ]
+then
+       . "${LIVE_CONF}"
+fi
 
 export USERNAME USERFULLNAME HOSTNAME
 
@@ -443,10 +447,10 @@ Do_snapshot ()
                                        grep -F -v -f "${EXCLUDE_LIST}" | \
                                        tr '\n' '\0' | \
                                        tr '\1' '\n' | \
-                                       $COPY_CMD || exit 1
+                                       eval $COPY_CMD || exit 1
                        else
                                cat "${TMP_FILELIST}" | \
-                                       $COPY_CMD || exit 1
+                                       eval $COPY_CMD || exit 1
                        fi
                        cd "${OLDPWD}"
                        ;;