X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=bin%2Flive-snapshot;h=991e7049806e100e912f323776b33d82ddaa4183;hb=d1191d52c1d77dc689135fb01119fe93e01a3855;hp=1e080c33d00f68b53323e91eeafc8f5da93b14fc;hpb=6fc8f78d026b31f4f4a3ee6507d726ddc37adbc8;p=live-boot-grml.git diff --git a/bin/live-snapshot b/bin/live-snapshot index 1e080c3..991e704 100755 --- a/bin/live-snapshot +++ b/bin/live-snapshot @@ -7,7 +7,7 @@ # for reuse in another live-boot session. # Look at the manpage for more informations. # -# Copyright (C) 2006-2008 Marco Amadori +# Copyright (C) 2006-2010 Marco Amadori # Copyright (C) 2008 Chris Lamb # # This program is free software: you can redistribute it and/or modify @@ -39,8 +39,12 @@ fi . /usr/share/initramfs-tools/scripts/live-helpers -LIVE_CONF="/etc/live.conf" -. "${LIVE_CONF}" +LIVE_CONF="/etc/live/boot.d/snapshot.conf" + +if [ -r "${LIVE_CONF}" ] +then + . "${LIVE_CONF}" +fi export USERNAME USERFULLNAME HOSTNAME @@ -238,7 +242,7 @@ Defaults () # Parse resync string if [ -n "${SNAP_RESYNC_STRING}" ] then - SNAP_COW=$(echo "${SNAP_RESYNC_STRING}" | sed -e 's|^/root\([^:.]*\).*$|'"${DEF_SNAP_COW}"'\1|') + SNAP_COW=$(echo "${SNAP_RESYNC_STRING}" | sed -r -e 's#^([^:]*).*$#'"${DEF_SNAP_COW}"'\1#') SNAP_DEV=$(echo "${SNAP_RESYNC_STRING}" | cut -f2 -d ':') SNAP_MNT=$(echo "${SNAP_RESYNC_STRING}" | cut -f3 -d ':') DEST="${MOUNTP}/${SNAP_MNT}"