Qual versão do busybox você tem? De acordo com o link se alguém pesquisar por exec
, pode encontrar em torno da linha 9352 seguinte código que parece suportar exec [-a customname] ...
execcmd(int argc UNUSED_PARAM, char **argv)
{
optionarg = NULL;
while (nextopt("a:") != 'execcmd(int argc UNUSED_PARAM, char **argv)
{
optionarg = NULL;
while (nextopt("a:") != '%pre%')
/* nextopt() sets optionarg to "-a ARGV0" */;
argv = argptr;
if (argv[0]) {
char *prog;
iflag = 0; /* exit on error */
mflag = 0;
optschanged();
/* We should set up signals for "exec CMD"
* the same way as for "CMD" without "exec".
* But optschanged->setinteractive->setsignal
* still thought we are a root shell. Therefore, for example,
* SIGQUIT is still set to IGN. Fix it:
*/
shlvl++;
setsignal(SIGQUIT);
/*setsignal(SIGTERM); - unnecessary because of iflag=0 */
/*setsignal(SIGTSTP); - unnecessary because of mflag=0 */
/*setsignal(SIGTTOU); - unnecessary because of mflag=0 */
prog = argv[0];
if (optionarg)
argv[0] = optionarg;
shellexec(prog, argv, pathval(), 0);
')
/* nextopt() sets optionarg to "-a ARGV0" */;
argv = argptr;
if (argv[0]) {
char *prog;
iflag = 0; /* exit on error */
mflag = 0;
optschanged();
/* We should set up signals for "exec CMD"
* the same way as for "CMD" without "exec".
* But optschanged->setinteractive->setsignal
* still thought we are a root shell. Therefore, for example,
* SIGQUIT is still set to IGN. Fix it:
*/
shlvl++;
setsignal(SIGQUIT);
/*setsignal(SIGTERM); - unnecessary because of iflag=0 */
/*setsignal(SIGTSTP); - unnecessary because of mflag=0 */
/*setsignal(SIGTTOU); - unnecessary because of mflag=0 */
prog = argv[0];
if (optionarg)
argv[0] = optionarg;
shellexec(prog, argv, pathval(), 0);