diff --git a/compute/src/test/resources/initscript_with_java.sh b/compute/src/test/resources/initscript_with_java.sh index 2c7dd047ec..99d05645c6 100644 --- a/compute/src/test/resources/initscript_with_java.sh +++ b/compute/src/test/resources/initscript_with_java.sh @@ -116,7 +116,7 @@ function ensure_netutils_yum() { # the /etc/hosts file, or they won't operate function ensure_hostname_in_hosts() { [ -n "$SSH_CONNECTION" ] && { - local ipaddr=`echo $SSH_CONNECTION | cut -d ' ' -f 3` + local ipaddr=`echo $SSH_CONNECTION | awk '{print $3}'` } || { local ipaddr=`hostname -i` } diff --git a/compute/src/test/resources/initscript_with_jetty.sh b/compute/src/test/resources/initscript_with_jetty.sh index 0aa421875b..11fbfd4a92 100644 --- a/compute/src/test/resources/initscript_with_jetty.sh +++ b/compute/src/test/resources/initscript_with_jetty.sh @@ -116,7 +116,7 @@ function ensure_netutils_yum() { # the /etc/hosts file, or they won't operate function ensure_hostname_in_hosts() { [ -n "$SSH_CONNECTION" ] && { - local ipaddr=`echo $SSH_CONNECTION | cut -d ' ' -f 3` + local ipaddr=`echo $SSH_CONNECTION | awk '{print $3}'` } || { local ipaddr=`hostname -i` } diff --git a/compute/src/test/resources/runscript.sh b/compute/src/test/resources/runscript.sh index 0715f775c4..b7d261e6bf 100644 --- a/compute/src/test/resources/runscript.sh +++ b/compute/src/test/resources/runscript.sh @@ -116,7 +116,7 @@ function ensure_netutils_yum() { # the /etc/hosts file, or they won't operate function ensure_hostname_in_hosts() { [ -n "$SSH_CONNECTION" ] && { - local ipaddr=`echo $SSH_CONNECTION | cut -d ' ' -f 3` + local ipaddr=`echo $SSH_CONNECTION | awk '{print $3}'` } || { local ipaddr=`hostname -i` } diff --git a/labs/virtualbox/src/test/resources/test_guest_additions_installer_init.sh b/labs/virtualbox/src/test/resources/test_guest_additions_installer_init.sh index 6209635882..ac192e6351 100644 --- a/labs/virtualbox/src/test/resources/test_guest_additions_installer_init.sh +++ b/labs/virtualbox/src/test/resources/test_guest_additions_installer_init.sh @@ -113,7 +113,7 @@ function ensure_netutils_yum() { # the /etc/hosts file, or they won't operate function ensure_hostname_in_hosts() { [ -n "$SSH_CONNECTION" ] && { - local ipaddr=`echo $SSH_CONNECTION | cut -d ' ' -f 3` + local ipaddr=`echo $SSH_CONNECTION | awk '{print $3}'` } || { local ipaddr=`hostname -i` } diff --git a/scriptbuilder/src/main/resources/functions/setupPublicCurl.sh b/scriptbuilder/src/main/resources/functions/setupPublicCurl.sh index eed22e7200..f5e1caba3f 100644 --- a/scriptbuilder/src/main/resources/functions/setupPublicCurl.sh +++ b/scriptbuilder/src/main/resources/functions/setupPublicCurl.sh @@ -31,7 +31,7 @@ function ensure_netutils_yum() { # the /etc/hosts file, or they won't operate function ensure_hostname_in_hosts() { [ -n "$SSH_CONNECTION" ] && { - local ipaddr=`echo $SSH_CONNECTION | cut -d ' ' -f 3` + local ipaddr=`echo $SSH_CONNECTION | awk '{print $3}'` } || { local ipaddr=`hostname -i` } diff --git a/scriptbuilder/src/test/resources/test_install_chef_gems_scriptbuilder.sh b/scriptbuilder/src/test/resources/test_install_chef_gems_scriptbuilder.sh index c561332bf3..9f0a9d35df 100644 --- a/scriptbuilder/src/test/resources/test_install_chef_gems_scriptbuilder.sh +++ b/scriptbuilder/src/test/resources/test_install_chef_gems_scriptbuilder.sh @@ -116,7 +116,7 @@ function ensure_netutils_yum() { # the /etc/hosts file, or they won't operate function ensure_hostname_in_hosts() { [ -n "$SSH_CONNECTION" ] && { - local ipaddr=`echo $SSH_CONNECTION | cut -d ' ' -f 3` + local ipaddr=`echo $SSH_CONNECTION | awk '{print $3}'` } || { local ipaddr=`hostname -i` } diff --git a/scriptbuilder/src/test/resources/test_install_git_scriptbuilder.sh b/scriptbuilder/src/test/resources/test_install_git_scriptbuilder.sh index 623e159f55..eb1b71d23d 100644 --- a/scriptbuilder/src/test/resources/test_install_git_scriptbuilder.sh +++ b/scriptbuilder/src/test/resources/test_install_git_scriptbuilder.sh @@ -116,7 +116,7 @@ function ensure_netutils_yum() { # the /etc/hosts file, or they won't operate function ensure_hostname_in_hosts() { [ -n "$SSH_CONNECTION" ] && { - local ipaddr=`echo $SSH_CONNECTION | cut -d ' ' -f 3` + local ipaddr=`echo $SSH_CONNECTION | awk '{print $3}'` } || { local ipaddr=`hostname -i` } diff --git a/scriptbuilder/src/test/resources/test_install_jdk_scriptbuilder.sh b/scriptbuilder/src/test/resources/test_install_jdk_scriptbuilder.sh index 0a39109b37..5157490c10 100644 --- a/scriptbuilder/src/test/resources/test_install_jdk_scriptbuilder.sh +++ b/scriptbuilder/src/test/resources/test_install_jdk_scriptbuilder.sh @@ -116,7 +116,7 @@ function ensure_netutils_yum() { # the /etc/hosts file, or they won't operate function ensure_hostname_in_hosts() { [ -n "$SSH_CONNECTION" ] && { - local ipaddr=`echo $SSH_CONNECTION | cut -d ' ' -f 3` + local ipaddr=`echo $SSH_CONNECTION | awk '{print $3}'` } || { local ipaddr=`hostname -i` } diff --git a/scriptbuilder/src/test/resources/test_install_ruby_scriptbuilder.sh b/scriptbuilder/src/test/resources/test_install_ruby_scriptbuilder.sh index ad20578d93..ed3e15ecfd 100644 --- a/scriptbuilder/src/test/resources/test_install_ruby_scriptbuilder.sh +++ b/scriptbuilder/src/test/resources/test_install_ruby_scriptbuilder.sh @@ -116,7 +116,7 @@ function ensure_netutils_yum() { # the /etc/hosts file, or they won't operate function ensure_hostname_in_hosts() { [ -n "$SSH_CONNECTION" ] && { - local ipaddr=`echo $SSH_CONNECTION | cut -d ' ' -f 3` + local ipaddr=`echo $SSH_CONNECTION | awk '{print $3}'` } || { local ipaddr=`hostname -i` }