From ad044050808af89c5b7af92c657e2d6c44510d4c Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Mon, 30 Apr 2012 08:16:37 +0000 Subject: Do not allow error status to leak from script. --- add-service | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/add-service b/add-service index 40e3985..cee3b14 100755 --- a/add-service +++ b/add-service @@ -174,7 +174,9 @@ check_sysvinit_service() { } if [ $num = 1 ]; then # First install mode - [ "null" != "$units" ] && add_service + if [ "null" != "$units" ]; then + add_service + fi else # Upgrade mode. reloaded=no @@ -278,8 +280,8 @@ else /bin/systemctl --quiet try-restart $iunit done fi - else - [ "null" != "$unit" ] && /bin/systemctl --quiet try-restart $unit + elif [ "null" != "$unit" ]; then + /bin/systemctl --quiet try-restart $unit fi done elif [ -f /etc/rc.d/init.d/$srv ]; then -- cgit v1.2.1