mirror of https://github.com/apache/jclouds.git
Issue #1240: replaced cut with awk
This commit is contained in:
parent
eedd8a26db
commit
4b64563f97
|
@ -116,7 +116,7 @@ function ensure_netutils_yum() {
|
||||||
# the /etc/hosts file, or they won't operate
|
# the /etc/hosts file, or they won't operate
|
||||||
function ensure_hostname_in_hosts() {
|
function ensure_hostname_in_hosts() {
|
||||||
[ -n "$SSH_CONNECTION" ] && {
|
[ -n "$SSH_CONNECTION" ] && {
|
||||||
local ipaddr=`echo $SSH_CONNECTION | cut -d ' ' -f 3`
|
local ipaddr=`echo $SSH_CONNECTION | awk '{print $3}'`
|
||||||
} || {
|
} || {
|
||||||
local ipaddr=`hostname -i`
|
local ipaddr=`hostname -i`
|
||||||
}
|
}
|
||||||
|
|
|
@ -116,7 +116,7 @@ function ensure_netutils_yum() {
|
||||||
# the /etc/hosts file, or they won't operate
|
# the /etc/hosts file, or they won't operate
|
||||||
function ensure_hostname_in_hosts() {
|
function ensure_hostname_in_hosts() {
|
||||||
[ -n "$SSH_CONNECTION" ] && {
|
[ -n "$SSH_CONNECTION" ] && {
|
||||||
local ipaddr=`echo $SSH_CONNECTION | cut -d ' ' -f 3`
|
local ipaddr=`echo $SSH_CONNECTION | awk '{print $3}'`
|
||||||
} || {
|
} || {
|
||||||
local ipaddr=`hostname -i`
|
local ipaddr=`hostname -i`
|
||||||
}
|
}
|
||||||
|
|
|
@ -116,7 +116,7 @@ function ensure_netutils_yum() {
|
||||||
# the /etc/hosts file, or they won't operate
|
# the /etc/hosts file, or they won't operate
|
||||||
function ensure_hostname_in_hosts() {
|
function ensure_hostname_in_hosts() {
|
||||||
[ -n "$SSH_CONNECTION" ] && {
|
[ -n "$SSH_CONNECTION" ] && {
|
||||||
local ipaddr=`echo $SSH_CONNECTION | cut -d ' ' -f 3`
|
local ipaddr=`echo $SSH_CONNECTION | awk '{print $3}'`
|
||||||
} || {
|
} || {
|
||||||
local ipaddr=`hostname -i`
|
local ipaddr=`hostname -i`
|
||||||
}
|
}
|
||||||
|
|
|
@ -113,7 +113,7 @@ function ensure_netutils_yum() {
|
||||||
# the /etc/hosts file, or they won't operate
|
# the /etc/hosts file, or they won't operate
|
||||||
function ensure_hostname_in_hosts() {
|
function ensure_hostname_in_hosts() {
|
||||||
[ -n "$SSH_CONNECTION" ] && {
|
[ -n "$SSH_CONNECTION" ] && {
|
||||||
local ipaddr=`echo $SSH_CONNECTION | cut -d ' ' -f 3`
|
local ipaddr=`echo $SSH_CONNECTION | awk '{print $3}'`
|
||||||
} || {
|
} || {
|
||||||
local ipaddr=`hostname -i`
|
local ipaddr=`hostname -i`
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ function ensure_netutils_yum() {
|
||||||
# the /etc/hosts file, or they won't operate
|
# the /etc/hosts file, or they won't operate
|
||||||
function ensure_hostname_in_hosts() {
|
function ensure_hostname_in_hosts() {
|
||||||
[ -n "$SSH_CONNECTION" ] && {
|
[ -n "$SSH_CONNECTION" ] && {
|
||||||
local ipaddr=`echo $SSH_CONNECTION | cut -d ' ' -f 3`
|
local ipaddr=`echo $SSH_CONNECTION | awk '{print $3}'`
|
||||||
} || {
|
} || {
|
||||||
local ipaddr=`hostname -i`
|
local ipaddr=`hostname -i`
|
||||||
}
|
}
|
||||||
|
|
|
@ -116,7 +116,7 @@ function ensure_netutils_yum() {
|
||||||
# the /etc/hosts file, or they won't operate
|
# the /etc/hosts file, or they won't operate
|
||||||
function ensure_hostname_in_hosts() {
|
function ensure_hostname_in_hosts() {
|
||||||
[ -n "$SSH_CONNECTION" ] && {
|
[ -n "$SSH_CONNECTION" ] && {
|
||||||
local ipaddr=`echo $SSH_CONNECTION | cut -d ' ' -f 3`
|
local ipaddr=`echo $SSH_CONNECTION | awk '{print $3}'`
|
||||||
} || {
|
} || {
|
||||||
local ipaddr=`hostname -i`
|
local ipaddr=`hostname -i`
|
||||||
}
|
}
|
||||||
|
|
|
@ -116,7 +116,7 @@ function ensure_netutils_yum() {
|
||||||
# the /etc/hosts file, or they won't operate
|
# the /etc/hosts file, or they won't operate
|
||||||
function ensure_hostname_in_hosts() {
|
function ensure_hostname_in_hosts() {
|
||||||
[ -n "$SSH_CONNECTION" ] && {
|
[ -n "$SSH_CONNECTION" ] && {
|
||||||
local ipaddr=`echo $SSH_CONNECTION | cut -d ' ' -f 3`
|
local ipaddr=`echo $SSH_CONNECTION | awk '{print $3}'`
|
||||||
} || {
|
} || {
|
||||||
local ipaddr=`hostname -i`
|
local ipaddr=`hostname -i`
|
||||||
}
|
}
|
||||||
|
|
|
@ -116,7 +116,7 @@ function ensure_netutils_yum() {
|
||||||
# the /etc/hosts file, or they won't operate
|
# the /etc/hosts file, or they won't operate
|
||||||
function ensure_hostname_in_hosts() {
|
function ensure_hostname_in_hosts() {
|
||||||
[ -n "$SSH_CONNECTION" ] && {
|
[ -n "$SSH_CONNECTION" ] && {
|
||||||
local ipaddr=`echo $SSH_CONNECTION | cut -d ' ' -f 3`
|
local ipaddr=`echo $SSH_CONNECTION | awk '{print $3}'`
|
||||||
} || {
|
} || {
|
||||||
local ipaddr=`hostname -i`
|
local ipaddr=`hostname -i`
|
||||||
}
|
}
|
||||||
|
|
|
@ -116,7 +116,7 @@ function ensure_netutils_yum() {
|
||||||
# the /etc/hosts file, or they won't operate
|
# the /etc/hosts file, or they won't operate
|
||||||
function ensure_hostname_in_hosts() {
|
function ensure_hostname_in_hosts() {
|
||||||
[ -n "$SSH_CONNECTION" ] && {
|
[ -n "$SSH_CONNECTION" ] && {
|
||||||
local ipaddr=`echo $SSH_CONNECTION | cut -d ' ' -f 3`
|
local ipaddr=`echo $SSH_CONNECTION | awk '{print $3}'`
|
||||||
} || {
|
} || {
|
||||||
local ipaddr=`hostname -i`
|
local ipaddr=`hostname -i`
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue