diff options
author | John Southworth <john.southworth@vyatta.com> | 2011-07-26 20:00:36 -0700 |
---|---|---|
committer | John Southworth <john.southworth@vyatta.com> | 2011-07-26 20:00:36 -0700 |
commit | 1cdbebe98a07d899b38b1769945bdd183ca254d2 (patch) | |
tree | 31946c6ef9c9e31973e85f68466fa18dbda7d67d | |
parent | ff7496b39917c074a7069599f4d48dc476e31619 (diff) | |
download | vyatta-bash-1cdbebe98a07d899b38b1769945bdd183ca254d2.tar.gz vyatta-bash-1cdbebe98a07d899b38b1769945bdd183ca254d2.zip |
Bugfix 6828: Make bash print a friendly message when exiting configuration mode with ctrl+d
-rw-r--r-- | parse.y | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -5614,8 +5614,14 @@ handle_eof_input_unit () { if (eof_encountered < eof_encountered_limit) { - fprintf (stderr, _("Use \"%s\" to leave the shell.\n"), + char *vyatta_configure_mode = getenv ( "_OFR_CONFIGURE" ); + if (*vyatta_configure_mode != NULL) { + fprintf (stderr, _("Use \"%s\" to leave configuration mode.\n"), login_shell ? "logout" : "exit"); + } else { + fprintf (stderr, _("Use \"%s\" to leave the shell.\n"), + login_shell ? "logout" : "exit"); + } eof_encountered++; /* Reset the parsing state. */ last_read_token = current_token = '\n'; |