From: Ihar Hrachyshka Date: Wed, 11 Feb 2015 16:10:10 +0000 (+0100) Subject: keepalived: use sh instead of bash for notifier scripts X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=7778edb92f11f20142dbf70f11dbefb2a8d73767;p=openstack-build%2Fneutron-build.git keepalived: use sh instead of bash for notifier scripts Those scripts are pretty trivial, calling external commands and using kill -s and $(...) construction. All that is available in POSIX shell, so let's not use bash in shebang and utilize more performant shell in case /bin/sh != /bin/bash (valid for Debian based systems). Change-Id: Ib5264c5ef51ca9028d7c27d440104a5ab978a557 --- diff --git a/neutron/agent/linux/keepalived.py b/neutron/agent/linux/keepalived.py index 19f46c8dc..ef6c9f77e 100644 --- a/neutron/agent/linux/keepalived.py +++ b/neutron/agent/linux/keepalived.py @@ -311,7 +311,7 @@ class KeepalivedNotifierMixin(object): return name def _prepend_shebang(self, script): - return '#!/usr/bin/env bash\n%s' % script + return '#!/bin/sh\n%s' % script def _append_state(self, script, state): state_path = self._get_full_config_file_path('state')