diff options
author | Daniil Baturin <daniil@baturin.org> | 2010-11-06 01:14:15 +0600 |
---|---|---|
committer | Stig Thormodsrud <stig@vyatta.com> | 2010-11-05 14:02:59 -0700 |
commit | 0dfc334b98828facb30e91c7429eb38fb53ed83a (patch) | |
tree | 65c934f87ffc9de5bc3fe8ab536ff5f3e1e155ef /scripts | |
parent | b9498dc3040002090ce4d1e3d28ce3957221d421 (diff) | |
download | vyatta-op-0dfc334b98828facb30e91c7429eb38fb53ed83a.tar.gz vyatta-op-0dfc334b98828facb30e91c7429eb38fb53ed83a.zip |
Fixed yesno error messages when run with no "-y" argument and with empty prompt.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/yesno | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/yesno b/scripts/yesno index 9955286..3e10e09 100755 --- a/scripts/yesno +++ b/scripts/yesno @@ -2,7 +2,7 @@ # Usage: yesno prompt... default= -if [ $1 == "-y" ] +if [ "$1" = "-y" ] then default='y'; shift fi @@ -14,7 +14,7 @@ fi while true do read -p "$prompt" || exit 1 - if [ -z "$REPLY" -a ! -z $default ] + if [ -z "$REPLY" -a ! -z "$default" ] then REPLY=$default fi case "$REPLY" in |