From 02bd1332066eb0531046803f6b35282ebc9be02b Mon Sep 17 00:00:00 2001 From: Martin André Date: Tue, 14 Jul 2015 14:42:18 +0900 Subject: Move keepalived common files to common dir While not a problem in itself, all common files should be moved to docker/common/keepalived to be more consistent with other containers. Change-Id: I6176bbf30bf42c58d4480e7bf48b1c4625eb9a15 Closes-Bug: #1474213 --- docker/centos/binary/keepalived/start.sh | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) mode change 100755 => 120000 docker/centos/binary/keepalived/start.sh (limited to 'docker/centos/binary/keepalived/start.sh') diff --git a/docker/centos/binary/keepalived/start.sh b/docker/centos/binary/keepalived/start.sh deleted file mode 100755 index 7f582b218..000000000 --- a/docker/centos/binary/keepalived/start.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -. /opt/kolla/kolla-common.sh - -check_required_vars KEEPALIVED_HOST_PRIORITIES PUBLIC_IP PUBLIC_INTERFACE - -MY_HOSTNAME=`hostname` - -# here we unpack KEEPALIVED_HOST_PRIORITIES hostname:priority pairs and match -# them with current hostname, if it's there -for i in ${KEEPALIVED_HOST_PRIORITIES//,/ }; do - HOST_PRIORITY=(${i//:/ }) - if [ "$MY_HOSTNAME" == "${HOST_PRIORITY[0]}" ]; then - KEEPALIVED_PRIORITY=${HOST_PRIORITY[1]} - fi -done - -if [ -z "$KEEPALIVED_PRIORITY" ]; then - echo "ERROR: missing hostname in KEEPALIVED_HOST_PRIORITIES: $MY_HOSTNAME" >&2 - exit 1 -fi - -sed -i ' - s|@PUBLIC_INTERFACE@|'$PUBLIC_INTERFACE'|g - s|@PUBLIC_IP@|'$PUBLIC_IP'|g - s|@KEEPALIVED_PRIORITY@|'$KEEPALIVED_PRIORITY'|g -' /etc/keepalived/keepalived.conf - -exec /usr/sbin/keepalived -nld -p /run/keepalived.pid diff --git a/docker/centos/binary/keepalived/start.sh b/docker/centos/binary/keepalived/start.sh new file mode 120000 index 000000000..05b222220 --- /dev/null +++ b/docker/centos/binary/keepalived/start.sh @@ -0,0 +1 @@ +../../../common/keepalived/start.sh \ No newline at end of file -- cgit v1.2.3