X-Git-Url: http://git.grml.org/?a=blobdiff_plain;ds=sidebyside;f=scripts%2Flive;h=efd0327aa8498a0d48c764e5a0443063677c8f38;hb=79d6bae5f387b2e0f38e47b9b46a78ad1e334a9f;hp=7e0b100232a894d84665b497e22f4b0a87dc873f;hpb=3d5ce935a643cd8266b8f9e147723088bdff2800;p=live-boot-grml.git diff --git a/scripts/live b/scripts/live index 7e0b100..efd0327 100755 --- a/scripts/live +++ b/scripts/live @@ -326,6 +326,15 @@ Arguments () export PERSISTENT ;; + persistent=*) + PERSISTENT="${ARGUMENT#persistent=}" + if [ -z "${PERSISTENT}" ] + then + PERSISTENT="Yes" + fi + export PERSISTENT + ;; + nopersistent) NOPERSISTENT="Yes" export NOPERSISTENT @@ -500,7 +509,7 @@ matches_uuid () path="${1}" uuid="$(cat /conf/uuid.conf)" - for try_uuid_file in "${mountpoint}/.disk/live-uuid"* + for try_uuid_file in "${path}/.disk/live-uuid"* do [ -e "${try_uuid_file}" ] || continue @@ -569,7 +578,7 @@ is_nice_device () { sysfs_path="${1#/sys}" - if /lib/udev/path_id "${sysfs_path}" | grep -E -q "ID_PATH=(usb|pci-[^-]*-[ide|scsi|usb])" + if /lib/udev/path_id "${sysfs_path}" | grep -E -q "ID_PATH=(usb|pci-[^-]*-(ide|scsi|usb))" then return 0 elif echo "${sysfs_path}" | grep -q '^/block/vd[a-z]$' @@ -604,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 '/\