Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP5:GA
resource-agents.11761
0015-Moving-shared-part-outside-if.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0015-Moving-shared-part-outside-if.patch of Package resource-agents.11761
From cdcc12a9c1431125b0d5298176e5242bfc9fbe29 Mon Sep 17 00:00:00 2001 From: krojzl <tomas_krojzl@cz.ibm.com> Date: Fri, 19 Apr 2019 11:20:09 +0200 Subject: [PATCH] Moving shared part outside if --- heartbeat/aws-vpc-move-ip | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/heartbeat/aws-vpc-move-ip b/heartbeat/aws-vpc-move-ip index 3a848b7e..bfe23e5b 100755 --- a/heartbeat/aws-vpc-move-ip +++ b/heartbeat/aws-vpc-move-ip @@ -222,26 +222,19 @@ ec2ip_get_and_configure() { MAC_FILE="/sys/class/net/${OCF_RESKEY_interface}/address" if [ -f $MAC_FILE ]; then cmd="cat ${MAC_FILE}" - ocf_log debug "executing command: $cmd" - MAC_ADDR="$(eval $cmd)" - rc=$? - if [ $rc != 0 ]; then - ocf_log warn "command failed, rc: $rc" - return $OCF_ERR_GENERIC - fi - ocf_log debug "MAC address associated with interface ${OCF_RESKEY_interface}: ${MAC_ADDR}" else cmd="ip -br link show dev ${OCF_RESKEY_interface} | tr -s ' ' | cut -d' ' -f3" - ocf_log debug "executing command: $cmd" - MAC_ADDR="$(eval $cmd)" - rc=$? - if [ $rc != 0 ]; then - ocf_log warn "command failed, rc: $rc" - return $OCF_ERR_GENERIC - fi - ocf_log debug "MAC address associated with interface ${OCF_RESKEY_interface}: ${MAC_ADDR}" fi + ocf_log debug "executing command: $cmd" + MAC_ADDR="$(eval $cmd)" + rc=$? + if [ $rc != 0 ]; then + ocf_log warn "command failed, rc: $rc" + return $OCF_ERR_GENERIC + fi + ocf_log debug "MAC address associated with interface ${OCF_RESKEY_interface}: ${MAC_ADDR}" + cmd="curl -s http://169.254.169.254/latest/meta-data/network/interfaces/macs/${MAC_ADDR}/interface-id" ocf_log debug "executing command: $cmd" EC2_NETWORK_INTERFACE_ID="$(eval $cmd)" -- 2.16.4
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor