From 7c7d70767527eb559dae557a86c60a21a0ee61a6 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Thu, 3 May 2012 16:03:09 +0000 Subject: [PATCH] Make code less ugly From: Michael Prokop --- ngcp-update-db-schema | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ngcp-update-db-schema b/ngcp-update-db-schema index b1ce067d..7f46fce2 100755 --- a/ngcp-update-db-schema +++ b/ngcp-update-db-schema @@ -70,7 +70,9 @@ if ! mysql -usipwise -p${SIPWISE_DB_PASSWORD} ngcp -e 'describe db_schema' >/de fi running_on_active_node() { - if [ -x /usr/sbin/ngcp-check_active ] ; then + if ! [ -x /usr/sbin/ngcp-check_active ] ; then + return 1 + else if /usr/sbin/ngcp-check_active -q ; then verbose "This seems to be the active node, nothing to do." return 0 @@ -78,8 +80,6 @@ running_on_active_node() { verbose "This seems to be the inactive node, applying revisions." return 1 fi - else - return 1 fi }