summaryrefslogtreecommitdiffstats
path: root/lib/common-functions.sh
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2016-01-29 02:33:42 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-01-29 02:33:43 +0000
commitfac6dbae17673165dcb035b5e3e921ce0fcd7391 (patch)
tree87420d83852a1fe6ebb39c5f0727c9e54f79e5e7 /lib/common-functions.sh
parentb315e999c780903e9ff59a5ffca0de339a436487 (diff)
parent2b761537334f56608db4a1ebc1d8abb0553cdbb2 (diff)
Merge "Various fixes and improvements"
Diffstat (limited to 'lib/common-functions.sh')
-rw-r--r--lib/common-functions.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/common-functions.sh b/lib/common-functions.sh
index 7435411e..0b1eb7d2 100644
--- a/lib/common-functions.sh
+++ b/lib/common-functions.sh
@@ -544,3 +544,19 @@ iptables -A FORWARD -s ${external_cidr} -m state --state ESTABLISHED,RELATED -j
service iptables save
EOI
}
+
+# Interactive prompt handler
+# params: step stage, ex. deploy, undercloud install, etc
+function prompt_user {
+ while [ 1 ]; do
+ echo -n "Would you like to proceed with ${1}? (y/n) "
+ read response
+ if [ "$response" == 'y' ]; then
+ return 0
+ elif [ "$response" == 'n' ]; then
+ return 1
+ else
+ continue
+ fi
+ done
+}