From a090ce76d2641d53e5412fc51957dd13cd1f1b61 Mon Sep 17 00:00:00 2001 From: Dimitri Mazmanov Date: Tue, 26 Jul 2016 12:07:27 +0200 Subject: Use head instead of tail When retreiving an environment id use head to get the first available environment Signed-off-by: Dimitri Mazmanov --- utils/fetch_os_creds.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'utils') 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 -- cgit 1.2.3-korg