From 5926688efe7d6832b8d95e9e48a078260b004f9b Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Sun, 22 Aug 2021 17:37:21 +0200 Subject: [PATCH] Add capacity check --- pool.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/pool.sh b/pool.sh index b18f545..6fe52b6 100755 --- a/pool.sh +++ b/pool.sh @@ -53,6 +53,7 @@ getp() { create() { [ -d "$POOL" ] && abort "Pool \"$POOL\" already exists" || : + [ ! "$1" -gt 0 ] && abort "Invalid pool capacity $1" || : mkdir -p "$POOL" # Write pool status maxproc=$1