diff options
author | Eric Andersen <andersen@codepoet.org> | 2001-10-19 00:22:23 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2001-10-19 00:22:23 +0000 |
commit | d63dee4019a62d1c5bb31755d9866ef921aff76b (patch) | |
tree | 1c5995c19999e51b9ed93ee12c2b4a8b421bdcd1 | |
parent | f4c208937c997f9b65e77b9304a527b03349d219 (diff) | |
download | busybox-w32-d63dee4019a62d1c5bb31755d9866ef921aff76b.tar.gz busybox-w32-d63dee4019a62d1c5bb31755d9866ef921aff76b.tar.bz2 busybox-w32-d63dee4019a62d1c5bb31755d9866ef921aff76b.zip |
Add an option to make the shells not advertise their busybox nature
-rw-r--r-- | Config.h | 3 | ||||
-rw-r--r-- | ash.c | 4 | ||||
-rw-r--r-- | hush.c | 5 | ||||
-rw-r--r-- | lash.c | 2 | ||||
-rw-r--r-- | msh.c | 2 | ||||
-rw-r--r-- | shell/ash.c | 4 | ||||
-rw-r--r-- | shell/hush.c | 5 | ||||
-rw-r--r-- | shell/lash.c | 2 | ||||
-rw-r--r-- | shell/msh.c | 2 |
9 files changed, 25 insertions, 4 deletions
@@ -302,6 +302,9 @@ | |||
302 | // Only relevant if a shell is enabled. | 302 | // Only relevant if a shell is enabled. |
303 | //#define BB_FEATURE_SH_FANCY_PROMPT | 303 | //#define BB_FEATURE_SH_FANCY_PROMPT |
304 | // | 304 | // |
305 | //Make interactive shells not print busybox messages | ||
306 | //#define BB_FEATURE_SH_EXTRA_QUIET | ||
307 | // | ||
305 | //Turn on extra fbset options | 308 | //Turn on extra fbset options |
306 | //#define BB_FEATURE_FBSET_FANCY | 309 | //#define BB_FEATURE_FBSET_FANCY |
307 | // | 310 | // |
@@ -3224,8 +3224,10 @@ setinteractive(int on) | |||
3224 | is_interactive = on; | 3224 | is_interactive = on; |
3225 | if (do_banner==0 && is_interactive) { | 3225 | if (do_banner==0 && is_interactive) { |
3226 | /* Looks like they want an interactive shell */ | 3226 | /* Looks like they want an interactive shell */ |
3227 | #ifndef BB_FEATURE_SH_EXTRA_QUIET | ||
3227 | printf( "\n\n" BB_BANNER " Built-in shell (ash)\n"); | 3228 | printf( "\n\n" BB_BANNER " Built-in shell (ash)\n"); |
3228 | printf( "Enter 'help' for a list of built-in commands.\n\n"); | 3229 | printf( "Enter 'help' for a list of built-in commands.\n\n"); |
3230 | #endif | ||
3229 | do_banner=1; | 3231 | do_banner=1; |
3230 | } | 3232 | } |
3231 | } | 3233 | } |
@@ -12728,7 +12730,7 @@ findvar(struct var **vpp, const char *name) | |||
12728 | /* | 12730 | /* |
12729 | * Copyright (c) 1999 Herbert Xu <herbert@debian.org> | 12731 | * Copyright (c) 1999 Herbert Xu <herbert@debian.org> |
12730 | * This file contains code for the times builtin. | 12732 | * This file contains code for the times builtin. |
12731 | * $Id: ash.c,v 1.27 2001/10/19 00:08:17 andersen Exp $ | 12733 | * $Id: ash.c,v 1.28 2001/10/19 00:22:22 andersen Exp $ |
12732 | */ | 12734 | */ |
12733 | static int timescmd (int argc, char **argv) | 12735 | static int timescmd (int argc, char **argv) |
12734 | { | 12736 | { |
@@ -2655,7 +2655,10 @@ int hush_main(int argc, char **argv) | |||
2655 | debug_printf("\ninteractive=%d\n", interactive); | 2655 | debug_printf("\ninteractive=%d\n", interactive); |
2656 | if (interactive) { | 2656 | if (interactive) { |
2657 | /* Looks like they want an interactive shell */ | 2657 | /* Looks like they want an interactive shell */ |
2658 | fprintf(stdout, "\nhush -- the humble shell v0.01 (testing)\n\n"); | 2658 | #ifndef BB_FEATURE_SH_EXTRA_QUIET |
2659 | printf( "\n\n" BB_BANNER " hush - the humble shell v0.01 (testing)\n"); | ||
2660 | printf( "Enter 'help' for a list of built-in commands.\n\n"); | ||
2661 | #endif | ||
2659 | setup_job_control(); | 2662 | setup_job_control(); |
2660 | } | 2663 | } |
2661 | 2664 | ||
@@ -1611,8 +1611,10 @@ int lash_main(int argc_l, char **argv_l) | |||
1611 | if (interactive==TRUE) { | 1611 | if (interactive==TRUE) { |
1612 | //printf( "optind=%d argv[optind]='%s'\n", optind, argv[optind]); | 1612 | //printf( "optind=%d argv[optind]='%s'\n", optind, argv[optind]); |
1613 | /* Looks like they want an interactive shell */ | 1613 | /* Looks like they want an interactive shell */ |
1614 | #ifndef BB_FEATURE_SH_EXTRA_QUIET | ||
1614 | printf( "\n\n" BB_BANNER " Built-in shell (lash)\n"); | 1615 | printf( "\n\n" BB_BANNER " Built-in shell (lash)\n"); |
1615 | printf( "Enter 'help' for a list of built-in commands.\n\n"); | 1616 | printf( "Enter 'help' for a list of built-in commands.\n\n"); |
1617 | #endif | ||
1616 | } else if (local_pending_command==NULL) { | 1618 | } else if (local_pending_command==NULL) { |
1617 | //printf( "optind=%d argv[optind]='%s'\n", optind, argv[optind]); | 1619 | //printf( "optind=%d argv[optind]='%s'\n", optind, argv[optind]); |
1618 | input = xfopen(argv[optind], "r"); | 1620 | input = xfopen(argv[optind], "r"); |
@@ -801,8 +801,10 @@ extern int msh_main(int argc, char **argv) | |||
801 | PUSHIO(afile, 0, iof); | 801 | PUSHIO(afile, 0, iof); |
802 | if (isatty(0) && isatty(1) && !cflag) { | 802 | if (isatty(0) && isatty(1) && !cflag) { |
803 | interactive++; | 803 | interactive++; |
804 | #ifndef BB_FEATURE_SH_EXTRA_QUIET | ||
804 | printf( "\n\n" BB_BANNER " Built-in shell (msh)\n"); | 805 | printf( "\n\n" BB_BANNER " Built-in shell (msh)\n"); |
805 | printf( "Enter 'help' for a list of built-in commands.\n\n"); | 806 | printf( "Enter 'help' for a list of built-in commands.\n\n"); |
807 | #endif | ||
806 | } | 808 | } |
807 | } | 809 | } |
808 | signal(SIGQUIT, qflag); | 810 | signal(SIGQUIT, qflag); |
diff --git a/shell/ash.c b/shell/ash.c index 5933b1518..486386a25 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -3224,8 +3224,10 @@ setinteractive(int on) | |||
3224 | is_interactive = on; | 3224 | is_interactive = on; |
3225 | if (do_banner==0 && is_interactive) { | 3225 | if (do_banner==0 && is_interactive) { |
3226 | /* Looks like they want an interactive shell */ | 3226 | /* Looks like they want an interactive shell */ |
3227 | #ifndef BB_FEATURE_SH_EXTRA_QUIET | ||
3227 | printf( "\n\n" BB_BANNER " Built-in shell (ash)\n"); | 3228 | printf( "\n\n" BB_BANNER " Built-in shell (ash)\n"); |
3228 | printf( "Enter 'help' for a list of built-in commands.\n\n"); | 3229 | printf( "Enter 'help' for a list of built-in commands.\n\n"); |
3230 | #endif | ||
3229 | do_banner=1; | 3231 | do_banner=1; |
3230 | } | 3232 | } |
3231 | } | 3233 | } |
@@ -12728,7 +12730,7 @@ findvar(struct var **vpp, const char *name) | |||
12728 | /* | 12730 | /* |
12729 | * Copyright (c) 1999 Herbert Xu <herbert@debian.org> | 12731 | * Copyright (c) 1999 Herbert Xu <herbert@debian.org> |
12730 | * This file contains code for the times builtin. | 12732 | * This file contains code for the times builtin. |
12731 | * $Id: ash.c,v 1.27 2001/10/19 00:08:17 andersen Exp $ | 12733 | * $Id: ash.c,v 1.28 2001/10/19 00:22:22 andersen Exp $ |
12732 | */ | 12734 | */ |
12733 | static int timescmd (int argc, char **argv) | 12735 | static int timescmd (int argc, char **argv) |
12734 | { | 12736 | { |
diff --git a/shell/hush.c b/shell/hush.c index 0e619f80e..cb0e6e980 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
@@ -2655,7 +2655,10 @@ int hush_main(int argc, char **argv) | |||
2655 | debug_printf("\ninteractive=%d\n", interactive); | 2655 | debug_printf("\ninteractive=%d\n", interactive); |
2656 | if (interactive) { | 2656 | if (interactive) { |
2657 | /* Looks like they want an interactive shell */ | 2657 | /* Looks like they want an interactive shell */ |
2658 | fprintf(stdout, "\nhush -- the humble shell v0.01 (testing)\n\n"); | 2658 | #ifndef BB_FEATURE_SH_EXTRA_QUIET |
2659 | printf( "\n\n" BB_BANNER " hush - the humble shell v0.01 (testing)\n"); | ||
2660 | printf( "Enter 'help' for a list of built-in commands.\n\n"); | ||
2661 | #endif | ||
2659 | setup_job_control(); | 2662 | setup_job_control(); |
2660 | } | 2663 | } |
2661 | 2664 | ||
diff --git a/shell/lash.c b/shell/lash.c index b3f7cb6a8..ffdec8781 100644 --- a/shell/lash.c +++ b/shell/lash.c | |||
@@ -1611,8 +1611,10 @@ int lash_main(int argc_l, char **argv_l) | |||
1611 | if (interactive==TRUE) { | 1611 | if (interactive==TRUE) { |
1612 | //printf( "optind=%d argv[optind]='%s'\n", optind, argv[optind]); | 1612 | //printf( "optind=%d argv[optind]='%s'\n", optind, argv[optind]); |
1613 | /* Looks like they want an interactive shell */ | 1613 | /* Looks like they want an interactive shell */ |
1614 | #ifndef BB_FEATURE_SH_EXTRA_QUIET | ||
1614 | printf( "\n\n" BB_BANNER " Built-in shell (lash)\n"); | 1615 | printf( "\n\n" BB_BANNER " Built-in shell (lash)\n"); |
1615 | printf( "Enter 'help' for a list of built-in commands.\n\n"); | 1616 | printf( "Enter 'help' for a list of built-in commands.\n\n"); |
1617 | #endif | ||
1616 | } else if (local_pending_command==NULL) { | 1618 | } else if (local_pending_command==NULL) { |
1617 | //printf( "optind=%d argv[optind]='%s'\n", optind, argv[optind]); | 1619 | //printf( "optind=%d argv[optind]='%s'\n", optind, argv[optind]); |
1618 | input = xfopen(argv[optind], "r"); | 1620 | input = xfopen(argv[optind], "r"); |
diff --git a/shell/msh.c b/shell/msh.c index e16d6f304..5c4ec1019 100644 --- a/shell/msh.c +++ b/shell/msh.c | |||
@@ -801,8 +801,10 @@ extern int msh_main(int argc, char **argv) | |||
801 | PUSHIO(afile, 0, iof); | 801 | PUSHIO(afile, 0, iof); |
802 | if (isatty(0) && isatty(1) && !cflag) { | 802 | if (isatty(0) && isatty(1) && !cflag) { |
803 | interactive++; | 803 | interactive++; |
804 | #ifndef BB_FEATURE_SH_EXTRA_QUIET | ||
804 | printf( "\n\n" BB_BANNER " Built-in shell (msh)\n"); | 805 | printf( "\n\n" BB_BANNER " Built-in shell (msh)\n"); |
805 | printf( "Enter 'help' for a list of built-in commands.\n\n"); | 806 | printf( "Enter 'help' for a list of built-in commands.\n\n"); |
807 | #endif | ||
806 | } | 808 | } |
807 | } | 809 | } |
808 | signal(SIGQUIT, qflag); | 810 | signal(SIGQUIT, qflag); |