From c2d1de1adb80c5fe8c8f8b755c7569f1a1439ffe Mon Sep 17 00:00:00 2001 From: Brian Flowers Date: Sun, 18 Sep 2016 23:18:43 -0400 Subject: [PATCH] bugfixes on compatibility --- bdsm.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bdsm.sh b/bdsm.sh index 79a22e0..ac2ab78 100755 --- a/bdsm.sh +++ b/bdsm.sh @@ -361,7 +361,7 @@ configure() error "$service plugin not found!" fi - max=`echo $params | wc -l` + max=`/home/bdsm/bdsm.d/$serviceFile help | grep "^::" | wc -l` newservice=`echo $service | cut -d'(' -f1`"(" i=1 while [ $i -le $max ]; do @@ -380,7 +380,7 @@ configure() # Validate removal/replacement of old service # TODO curHost="`cat /home/bdsm/.bdsm.conf.tmp | grep ":$host{"`" - curHost=`echo $curHost | sed "s/$service;//g" | sed "s/}\$/$newservice;}/g"` + curHost=`echo $curHost | sed "s/$service;//g" | sed "s|}\$|$newservice;}|g"` cat /home/bdsm/.bdsm.conf.tmp | \ grep -v ":$host{" \ > /home/bdsm/.bdsm.conf.tmp2 @@ -388,7 +388,6 @@ configure() mv /home/bdsm/.bdsm.conf.tmp2 /home/bdsm/.bdsm.conf.tmp # Reload the hosts list hosts=$(cat /home/bdsm/.bdsm.conf.tmp | cut -d'{' -f1) -set +x done # Convert config back to a more readable format -- 1.8.3.1