Add an option to make the shells not advertise their busybox nature
authorEric Andersen <andersen@codepoet.org>
Fri, 19 Oct 2001 00:22:23 +0000 (00:22 -0000)
committerEric Andersen <andersen@codepoet.org>
Fri, 19 Oct 2001 00:22:23 +0000 (00:22 -0000)
Config.h
ash.c
hush.c
lash.c
msh.c
shell/ash.c
shell/hush.c
shell/lash.c
shell/msh.c

index a62e3fb733e0898c6746dc0cd20db2077b9d39dc..73b0f91f857f8f5c507304d4a5f3cb21f7e429c4 100644 (file)
--- a/Config.h
+++ b/Config.h
 // Only relevant if a shell is enabled.
 //#define BB_FEATURE_SH_FANCY_PROMPT
 //
+//Make interactive shells not print busybox messages
+//#define BB_FEATURE_SH_EXTRA_QUIET
+//
 //Turn on extra fbset options
 //#define BB_FEATURE_FBSET_FANCY
 //
diff --git a/ash.c b/ash.c
index 5933b151834db179e0db6b7f9455355530ec94b8..486386a257a38ed4d45936de18e9b4b89a637183 100644 (file)
--- a/ash.c
+++ b/ash.c
@@ -3224,8 +3224,10 @@ setinteractive(int on)
        is_interactive = on;
        if (do_banner==0 && is_interactive) {
                /* Looks like they want an interactive shell */
+#ifndef BB_FEATURE_SH_EXTRA_QUIET 
                printf( "\n\n" BB_BANNER " Built-in shell (ash)\n");
                printf( "Enter 'help' for a list of built-in commands.\n\n");
+#endif
                do_banner=1;
        }
 }
@@ -12728,7 +12730,7 @@ findvar(struct var **vpp, const char *name)
 /*
  * Copyright (c) 1999 Herbert Xu <herbert@debian.org>
  * This file contains code for the times builtin.
- * $Id: ash.c,v 1.27 2001/10/19 00:08:17 andersen Exp $
+ * $Id: ash.c,v 1.28 2001/10/19 00:22:22 andersen Exp $
  */
 static int timescmd (int argc, char **argv)
 {
diff --git a/hush.c b/hush.c
index 0e619f80ecf3f9f78de7c38aaeac1b29e114c971..cb0e6e98054e5390876814603eb5df4a1aaff355 100644 (file)
--- a/hush.c
+++ b/hush.c
@@ -2655,7 +2655,10 @@ int hush_main(int argc, char **argv)
        debug_printf("\ninteractive=%d\n", interactive);
        if (interactive) {
                /* Looks like they want an interactive shell */
-               fprintf(stdout, "\nhush -- the humble shell v0.01 (testing)\n\n");
+#ifndef BB_FEATURE_SH_EXTRA_QUIET 
+               printf( "\n\n" BB_BANNER " hush - the humble shell v0.01 (testing)\n");
+               printf( "Enter 'help' for a list of built-in commands.\n\n");
+#endif
                setup_job_control();
        }
        
diff --git a/lash.c b/lash.c
index b3f7cb6a80e088d39fdf61b7cc708ad7913fb700..ffdec8781f5a5c69eb9d1eada0b10f9400ea7884 100644 (file)
--- a/lash.c
+++ b/lash.c
@@ -1611,8 +1611,10 @@ int lash_main(int argc_l, char **argv_l)
        if (interactive==TRUE) {
                //printf( "optind=%d  argv[optind]='%s'\n", optind, argv[optind]);
                /* Looks like they want an interactive shell */
+#ifndef BB_FEATURE_SH_EXTRA_QUIET 
                printf( "\n\n" BB_BANNER " Built-in shell (lash)\n");
                printf( "Enter 'help' for a list of built-in commands.\n\n");
+#endif
        } else if (local_pending_command==NULL) {
                //printf( "optind=%d  argv[optind]='%s'\n", optind, argv[optind]);
                input = xfopen(argv[optind], "r");
diff --git a/msh.c b/msh.c
index e16d6f304b6fe8c473dcd6dd81cad6b5cbd7a5f9..5c4ec1019bc68673efe40b6aa7096eeb5b1faf32 100644 (file)
--- a/msh.c
+++ b/msh.c
@@ -801,8 +801,10 @@ extern int msh_main(int argc, char **argv)
                PUSHIO(afile, 0, iof);
                if (isatty(0) && isatty(1) && !cflag) {
                        interactive++;
+#ifndef BB_FEATURE_SH_EXTRA_QUIET 
                        printf( "\n\n" BB_BANNER " Built-in shell (msh)\n");
                        printf( "Enter 'help' for a list of built-in commands.\n\n");
+#endif
                }
        }
        signal(SIGQUIT, qflag);
index 5933b151834db179e0db6b7f9455355530ec94b8..486386a257a38ed4d45936de18e9b4b89a637183 100644 (file)
@@ -3224,8 +3224,10 @@ setinteractive(int on)
        is_interactive = on;
        if (do_banner==0 && is_interactive) {
                /* Looks like they want an interactive shell */
+#ifndef BB_FEATURE_SH_EXTRA_QUIET 
                printf( "\n\n" BB_BANNER " Built-in shell (ash)\n");
                printf( "Enter 'help' for a list of built-in commands.\n\n");
+#endif
                do_banner=1;
        }
 }
@@ -12728,7 +12730,7 @@ findvar(struct var **vpp, const char *name)
 /*
  * Copyright (c) 1999 Herbert Xu <herbert@debian.org>
  * This file contains code for the times builtin.
- * $Id: ash.c,v 1.27 2001/10/19 00:08:17 andersen Exp $
+ * $Id: ash.c,v 1.28 2001/10/19 00:22:22 andersen Exp $
  */
 static int timescmd (int argc, char **argv)
 {
index 0e619f80ecf3f9f78de7c38aaeac1b29e114c971..cb0e6e98054e5390876814603eb5df4a1aaff355 100644 (file)
@@ -2655,7 +2655,10 @@ int hush_main(int argc, char **argv)
        debug_printf("\ninteractive=%d\n", interactive);
        if (interactive) {
                /* Looks like they want an interactive shell */
-               fprintf(stdout, "\nhush -- the humble shell v0.01 (testing)\n\n");
+#ifndef BB_FEATURE_SH_EXTRA_QUIET 
+               printf( "\n\n" BB_BANNER " hush - the humble shell v0.01 (testing)\n");
+               printf( "Enter 'help' for a list of built-in commands.\n\n");
+#endif
                setup_job_control();
        }
        
index b3f7cb6a80e088d39fdf61b7cc708ad7913fb700..ffdec8781f5a5c69eb9d1eada0b10f9400ea7884 100644 (file)
@@ -1611,8 +1611,10 @@ int lash_main(int argc_l, char **argv_l)
        if (interactive==TRUE) {
                //printf( "optind=%d  argv[optind]='%s'\n", optind, argv[optind]);
                /* Looks like they want an interactive shell */
+#ifndef BB_FEATURE_SH_EXTRA_QUIET 
                printf( "\n\n" BB_BANNER " Built-in shell (lash)\n");
                printf( "Enter 'help' for a list of built-in commands.\n\n");
+#endif
        } else if (local_pending_command==NULL) {
                //printf( "optind=%d  argv[optind]='%s'\n", optind, argv[optind]);
                input = xfopen(argv[optind], "r");
index e16d6f304b6fe8c473dcd6dd81cad6b5cbd7a5f9..5c4ec1019bc68673efe40b6aa7096eeb5b1faf32 100644 (file)
@@ -801,8 +801,10 @@ extern int msh_main(int argc, char **argv)
                PUSHIO(afile, 0, iof);
                if (isatty(0) && isatty(1) && !cflag) {
                        interactive++;
+#ifndef BB_FEATURE_SH_EXTRA_QUIET 
                        printf( "\n\n" BB_BANNER " Built-in shell (msh)\n");
                        printf( "Enter 'help' for a list of built-in commands.\n\n");
+#endif
                }
        }
        signal(SIGQUIT, qflag);