summaryrefslogtreecommitdiff
path: root/scripts/yesno
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-09-19 19:45:42 +0200
committerChristian Poessinger <christian@poessinger.com>2019-09-19 19:45:42 +0200
commit4d5c59048087b6fd1a3f50b91e0988ea6b78ad0e (patch)
tree5572733238700af216f5e8b5c695c1eb60044eaa /scripts/yesno
parent0b1477913efbf511bd61ccd95683b95c7c9bda83 (diff)
parent6c460809b650377d2803b433c75914d7b707592e (diff)
downloadvyatta-op-4d5c59048087b6fd1a3f50b91e0988ea6b78ad0e.tar.gz
vyatta-op-4d5c59048087b6fd1a3f50b91e0988ea6b78ad0e.zip
Merge branch 'current' of github.com:vyos/vyatta-op into equuleus
* 'current' of github.com:vyos/vyatta-op: [ping] T1450 Recovering ping for ipv6 T1621 remove misc ops after python/xml rewrite T1607 remove 'reset conntrack', 'reset & show ip[v6]' ops after xml rewrite T1596 Remove telnet and traceroute operations after xml-style rewrite
Diffstat (limited to 'scripts/yesno')
-rwxr-xr-xscripts/yesno31
1 files changed, 0 insertions, 31 deletions
diff --git a/scripts/yesno b/scripts/yesno
deleted file mode 100755
index 260a23c..0000000
--- a/scripts/yesno
+++ /dev/null
@@ -1,31 +0,0 @@
-#! /bin/bash
-# Usage: yesno prompt...
-
-default=
-if [ "$1" = "-y" ]
-then default='y'; shift
-elif [[ "$1" = "-n" ]]; then
- default='n'; shift
-fi
-
-
-if [ $# -eq 0 ]
-then prompt="yes or no: "
-else prompt="$*"
-fi
-
-while true
-do
- read -p "$prompt" || exit 1
- if [ -z "$REPLY" -a ! -z "$default" ]
- then REPLY=$default
- fi
- case "$REPLY" in
- y*|Y*) exit 0;;
- n*|n*) exit 1;;
- *) echo "Answer yes or no please";;
- esac
-done
-
-
-