mirror of
https://github.com/adron-s/mtik_initrd_hacks.git
synced 2025-12-10 07:44:40 +01:00
16 lines
310 B
C
16 lines
310 B
C
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <unistd.h>
|
|
|
|
extern char** environ;
|
|
|
|
int main(int argc, char *argv[]){
|
|
char *new_argv[] = { "/bin/busybox", "sh", "/etc/rc.d/rc.S", NULL };
|
|
|
|
environ[0] = "PATH=/sbin:/bin";
|
|
environ[1] = NULL;
|
|
|
|
execvp(new_argv[0], new_argv);
|
|
return 0;
|
|
}
|