From 62660a86372290833bb5648106b530e6d9137a94 Mon Sep 17 00:00:00 2001 From: Aleksander Mistewicz Date: Mon, 1 Aug 2016 09:46:07 +0200 Subject: [PATCH] Use WS instead of / in tsp/jobs/watch_diskspace.sh Manual configuration was required for this script to use proper value. Now it gets it automatically. Change-Id: Icd0881ba05bafe120387f159fbb29c5c604d8a27 Signed-off-by: Aleksander Mistewicz --- tsp/jobs/watch_diskspace.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tsp/jobs/watch_diskspace.sh b/tsp/jobs/watch_diskspace.sh index b4acd1f..0ea233c 100755 --- a/tsp/jobs/watch_diskspace.sh +++ b/tsp/jobs/watch_diskspace.sh @@ -20,9 +20,8 @@ export TSP_DIR="$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd -P)/.." . "${TSP_DIR}/common.sh" -# Assume workspaces are stored on root partition. -# Get diskspace usage for root mountpoint. -PER="$(df -Ph | grep -o "[0-9][0-9]%.*/$")" +# Get diskspace usage for filesystem storing workspaces. +PER="$(df -P "${WS}" | grep -o "[0-9][0-9]%.*$")" # Leave only numerical value. PER="${PER%\%*}" if [ "$PER" -ge 70 ] -- 2.7.4