Add an option to make the shells not advertise their busybox nature
This commit is contained in:
parent
f4c208937c
commit
d63dee4019
3
Config.h
3
Config.h
@ -302,6 +302,9 @@
|
|||||||
// Only relevant if a shell is enabled.
|
// Only relevant if a shell is enabled.
|
||||||
//#define BB_FEATURE_SH_FANCY_PROMPT
|
//#define BB_FEATURE_SH_FANCY_PROMPT
|
||||||
//
|
//
|
||||||
|
//Make interactive shells not print busybox messages
|
||||||
|
//#define BB_FEATURE_SH_EXTRA_QUIET
|
||||||
|
//
|
||||||
//Turn on extra fbset options
|
//Turn on extra fbset options
|
||||||
//#define BB_FEATURE_FBSET_FANCY
|
//#define BB_FEATURE_FBSET_FANCY
|
||||||
//
|
//
|
||||||
|
4
ash.c
4
ash.c
@ -3224,8 +3224,10 @@ setinteractive(int on)
|
|||||||
is_interactive = on;
|
is_interactive = on;
|
||||||
if (do_banner==0 && is_interactive) {
|
if (do_banner==0 && is_interactive) {
|
||||||
/* Looks like they want an interactive shell */
|
/* Looks like they want an interactive shell */
|
||||||
|
#ifndef BB_FEATURE_SH_EXTRA_QUIET
|
||||||
printf( "\n\n" BB_BANNER " Built-in shell (ash)\n");
|
printf( "\n\n" BB_BANNER " Built-in shell (ash)\n");
|
||||||
printf( "Enter 'help' for a list of built-in commands.\n\n");
|
printf( "Enter 'help' for a list of built-in commands.\n\n");
|
||||||
|
#endif
|
||||||
do_banner=1;
|
do_banner=1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -12728,7 +12730,7 @@ findvar(struct var **vpp, const char *name)
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1999 Herbert Xu <herbert@debian.org>
|
* Copyright (c) 1999 Herbert Xu <herbert@debian.org>
|
||||||
* This file contains code for the times builtin.
|
* 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)
|
static int timescmd (int argc, char **argv)
|
||||||
{
|
{
|
||||||
|
5
hush.c
5
hush.c
@ -2655,7 +2655,10 @@ int hush_main(int argc, char **argv)
|
|||||||
debug_printf("\ninteractive=%d\n", interactive);
|
debug_printf("\ninteractive=%d\n", interactive);
|
||||||
if (interactive) {
|
if (interactive) {
|
||||||
/* Looks like they want an interactive shell */
|
/* 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();
|
setup_job_control();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
lash.c
2
lash.c
@ -1611,8 +1611,10 @@ int lash_main(int argc_l, char **argv_l)
|
|||||||
if (interactive==TRUE) {
|
if (interactive==TRUE) {
|
||||||
//printf( "optind=%d argv[optind]='%s'\n", optind, argv[optind]);
|
//printf( "optind=%d argv[optind]='%s'\n", optind, argv[optind]);
|
||||||
/* Looks like they want an interactive shell */
|
/* Looks like they want an interactive shell */
|
||||||
|
#ifndef BB_FEATURE_SH_EXTRA_QUIET
|
||||||
printf( "\n\n" BB_BANNER " Built-in shell (lash)\n");
|
printf( "\n\n" BB_BANNER " Built-in shell (lash)\n");
|
||||||
printf( "Enter 'help' for a list of built-in commands.\n\n");
|
printf( "Enter 'help' for a list of built-in commands.\n\n");
|
||||||
|
#endif
|
||||||
} else if (local_pending_command==NULL) {
|
} else if (local_pending_command==NULL) {
|
||||||
//printf( "optind=%d argv[optind]='%s'\n", optind, argv[optind]);
|
//printf( "optind=%d argv[optind]='%s'\n", optind, argv[optind]);
|
||||||
input = xfopen(argv[optind], "r");
|
input = xfopen(argv[optind], "r");
|
||||||
|
2
msh.c
2
msh.c
@ -801,8 +801,10 @@ extern int msh_main(int argc, char **argv)
|
|||||||
PUSHIO(afile, 0, iof);
|
PUSHIO(afile, 0, iof);
|
||||||
if (isatty(0) && isatty(1) && !cflag) {
|
if (isatty(0) && isatty(1) && !cflag) {
|
||||||
interactive++;
|
interactive++;
|
||||||
|
#ifndef BB_FEATURE_SH_EXTRA_QUIET
|
||||||
printf( "\n\n" BB_BANNER " Built-in shell (msh)\n");
|
printf( "\n\n" BB_BANNER " Built-in shell (msh)\n");
|
||||||
printf( "Enter 'help' for a list of built-in commands.\n\n");
|
printf( "Enter 'help' for a list of built-in commands.\n\n");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
signal(SIGQUIT, qflag);
|
signal(SIGQUIT, qflag);
|
||||||
|
@ -3224,8 +3224,10 @@ setinteractive(int on)
|
|||||||
is_interactive = on;
|
is_interactive = on;
|
||||||
if (do_banner==0 && is_interactive) {
|
if (do_banner==0 && is_interactive) {
|
||||||
/* Looks like they want an interactive shell */
|
/* Looks like they want an interactive shell */
|
||||||
|
#ifndef BB_FEATURE_SH_EXTRA_QUIET
|
||||||
printf( "\n\n" BB_BANNER " Built-in shell (ash)\n");
|
printf( "\n\n" BB_BANNER " Built-in shell (ash)\n");
|
||||||
printf( "Enter 'help' for a list of built-in commands.\n\n");
|
printf( "Enter 'help' for a list of built-in commands.\n\n");
|
||||||
|
#endif
|
||||||
do_banner=1;
|
do_banner=1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -12728,7 +12730,7 @@ findvar(struct var **vpp, const char *name)
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1999 Herbert Xu <herbert@debian.org>
|
* Copyright (c) 1999 Herbert Xu <herbert@debian.org>
|
||||||
* This file contains code for the times builtin.
|
* 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)
|
static int timescmd (int argc, char **argv)
|
||||||
{
|
{
|
||||||
|
@ -2655,7 +2655,10 @@ int hush_main(int argc, char **argv)
|
|||||||
debug_printf("\ninteractive=%d\n", interactive);
|
debug_printf("\ninteractive=%d\n", interactive);
|
||||||
if (interactive) {
|
if (interactive) {
|
||||||
/* Looks like they want an interactive shell */
|
/* 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();
|
setup_job_control();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1611,8 +1611,10 @@ int lash_main(int argc_l, char **argv_l)
|
|||||||
if (interactive==TRUE) {
|
if (interactive==TRUE) {
|
||||||
//printf( "optind=%d argv[optind]='%s'\n", optind, argv[optind]);
|
//printf( "optind=%d argv[optind]='%s'\n", optind, argv[optind]);
|
||||||
/* Looks like they want an interactive shell */
|
/* Looks like they want an interactive shell */
|
||||||
|
#ifndef BB_FEATURE_SH_EXTRA_QUIET
|
||||||
printf( "\n\n" BB_BANNER " Built-in shell (lash)\n");
|
printf( "\n\n" BB_BANNER " Built-in shell (lash)\n");
|
||||||
printf( "Enter 'help' for a list of built-in commands.\n\n");
|
printf( "Enter 'help' for a list of built-in commands.\n\n");
|
||||||
|
#endif
|
||||||
} else if (local_pending_command==NULL) {
|
} else if (local_pending_command==NULL) {
|
||||||
//printf( "optind=%d argv[optind]='%s'\n", optind, argv[optind]);
|
//printf( "optind=%d argv[optind]='%s'\n", optind, argv[optind]);
|
||||||
input = xfopen(argv[optind], "r");
|
input = xfopen(argv[optind], "r");
|
||||||
|
@ -801,8 +801,10 @@ extern int msh_main(int argc, char **argv)
|
|||||||
PUSHIO(afile, 0, iof);
|
PUSHIO(afile, 0, iof);
|
||||||
if (isatty(0) && isatty(1) && !cflag) {
|
if (isatty(0) && isatty(1) && !cflag) {
|
||||||
interactive++;
|
interactive++;
|
||||||
|
#ifndef BB_FEATURE_SH_EXTRA_QUIET
|
||||||
printf( "\n\n" BB_BANNER " Built-in shell (msh)\n");
|
printf( "\n\n" BB_BANNER " Built-in shell (msh)\n");
|
||||||
printf( "Enter 'help' for a list of built-in commands.\n\n");
|
printf( "Enter 'help' for a list of built-in commands.\n\n");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
signal(SIGQUIT, qflag);
|
signal(SIGQUIT, qflag);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user