From: Dimitri Mazmanov Date: Tue, 26 Jul 2016 10:07:27 +0000 (+0200) Subject: Use head instead of tail X-Git-Tag: colorado.1.0~218 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=a090ce76d2641d53e5412fc51957dd13cd1f1b61;p=releng.git Use head instead of tail When retreiving an environment id use head to get the first available environment Signed-off-by: Dimitri Mazmanov --- diff --git a/utils/fetch_os_creds.sh b/utils/fetch_os_creds.sh index 34c81af1a..65c8af3d2 100755 --- a/utils/fetch_os_creds.sh +++ b/utils/fetch_os_creds.sh @@ -81,7 +81,7 @@ if [ "$installer_type" == "fuel" ]; then verify_connectivity $installer_ip env=$(sshpass -p r00tme ssh 2>/dev/null $ssh_options root@${installer_ip} \ - 'fuel env'|grep operational|tail -1|awk '{print $1}') &> /dev/null + 'fuel env'|grep operational|head -1|awk '{print $1}') &> /dev/null if [ -z $env ]; then error "No operational environment detected in Fuel" fi