From a7daca90ddbd92f63d6a69d4de2a286d5206a6b7 Mon Sep 17 00:00:00 2001 From: Bruno Tavares Date: Sat, 26 Sep 2015 23:35:05 -0300 Subject: [PATCH] Fix prompt when executing the deployment with the password `sudo -S` reads the password from stdin. The way it was it was executing the deploy script with the password as the stdin of the pipe. Now, when password is passed as an argument we aquire a sudo session executing a command that always work and then prefixing the installation with sudo. --- lib/kickstart-deploy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/kickstart-deploy b/lib/kickstart-deploy index 68d89c7..fdacb76 100755 --- a/lib/kickstart-deploy +++ b/lib/kickstart-deploy @@ -1,7 +1,7 @@ #!/bin/bash -e [[ "$1" == "--sudo" ]] && prefix="sudo " && shift -[[ "$1" == "--password" ]] && shift && prefix="echo \"$1\" | sudo -S " && shift +[[ "$1" == "--password" ]] && shift && prefix="echo \"$1\" | sudo -S true && sudo " && shift target=$1 [ "$target" ] || echo "Please, provide an ssh target"