diff --git a/bin/live-snapshot b/bin/live-snapshot index 0dcfae1..3d4efad 100755 --- a/bin/live-snapshot +++ b/bin/live-snapshot @@ -346,8 +346,8 @@ Do_filelist () TMP_FILELIST=$1 if [ -f "${SNAP_LIST}" ] then - # Generate include list - for entry in $(cat "${SNAP_LIST}" | grep -v '^#.*$' | grep -v '^ *$') + # Generate include list removing empty and commented lines + for entry in $(sed -e '/^ *$/d' -e '/^#.*$/d' "${SNAP_LIST}") do if [ -d "${entry}" ] then diff --git a/scripts/live b/scripts/live index fd0da8b..9c747d5 100755 --- a/scripts/live +++ b/scripts/live @@ -613,7 +613,7 @@ copy_live_to () if [ "${copytodev}" = "ram" ] then # copying to ram: - freespace=$( expr $(awk '/MemFree/{print $2}' /proc/meminfo) + $( cat /proc/meminfo | grep Cached | head -n 1 | awk '/Cached/{print $2}' - ) ) + freespace=$( expr $(awk '/MemFree/{print $2}' /proc/meminfo) + $( awk '/\