On Tue, Jan 31, 2017 at 10:49 PM, Sriram V <[email protected]> wrote: > 1. ifplugd is a command which accepts a shell script as an argument. > 2. if the link is up/down. It is supposed to invoke the shell script. > 3. The code does a vfork and exec (2) system call. > 4. I find that vfork is successful. However exec on a shell script > (with executable permissions does) not work. > 5. I get the error code as 2. which is no such file. I have given > absolute pathname as well. > 6. Is there a problem on arm system to use exec(2) on a shell script. > > > # busybox ifplugd -nI > ifplugd(eth0): started: BusyBox v1.27.0.git (2017-01-31 17:58:49 IST) > ifplugd(eth0): using SIOCETHTOOL detection mode > ifplugd(eth0): link is up > ifplugd(eth0): executing '/etc/ifplugd/ifplugd.action eth0 up' (<<< > This is just a print before calling vfork and exec >>>) > ifplugd(eth0): exit code: 255 > The exit code 255 here could mean _any_ kind of execvp error. (To be precise, execvp(2) actually returns -1 upon error, which is got "translated" by ifplugd so that you see exit code 255). It's not limited to "no such file" case, so how can you be sure it's a "no such file" error?
Also, you said you intend to run a shell script. Have you built a shell in BusyBox? I would be surprised if you made such a newbie mistake. _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
