[PATCH 12/13] hush: allow to run interactive shell in do_sh

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This allows to call 'sh' in scripts without arguments in which
case an interactive shell will be started.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 common/hush.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/hush.c b/common/hush.c
index ab513af..d915f9e 100644
--- a/common/hush.c
+++ b/common/hush.c
@@ -1814,7 +1814,7 @@ int run_shell(void)
 static int do_sh(int argc, char *argv[])
 {
 	if (argc < 2)
-		return COMMAND_ERROR_USAGE;
+		return run_shell();
 
 	return execute_script(argv[1], argc - 1, argv + 1);
 }
-- 
1.7.10


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox


[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux