use cache only if user specified cache size

pull/40/head
TomasM 2017-10-30 08:16:30 -04:00
parent 35a639d3cf
commit e548ecd4b5
1 changed files with 2 additions and 2 deletions

View File

@ -396,7 +396,7 @@ mount_data_http()
CACHE=$(cmdline_value cache | sed -r "s/[^0-9]//g" | sed -r "s/^0+//g") CACHE=$(cmdline_value cache | sed -r "s/[^0-9]//g" | sed -r "s/^0+//g")
if [ "$CACHE" != "" ]; then if [ "$CACHE" != "" ]; then
CACHE="-S "$(($CACHE*1024*1024)) CACHE="-C /tmp/httpfs.cache -S "$(($CACHE*1024*1024))
fi fi
init_network_ip init_network_ip
@ -404,7 +404,7 @@ mount_data_http()
if [ "$(network_device)" != "" ]; then if [ "$(network_device)" != "" ]; then
echo "* Mounting remote file..." >&2 echo "* Mounting remote file..." >&2
mkdir -p "$2" mkdir -p "$2"
mount.httpfs2 -r 9999 -t 5 -C /tmp/httpfs.cache $CACHE -c /dev/null "$1" "$2" >/dev/null 2>/dev/null mount.httpfs2 -r 9999 -t 5 $CACHE -c /dev/null "$1" "$2" >/dev/null 2>/dev/null
mount -o loop "$2"/* "$2" # self mount mount -o loop "$2"/* "$2" # self mount
echo "$2/$LIVEKITNAME" echo "$2/$LIVEKITNAME"
fi fi