From 0727458a97350158340b81c874ad7bce4378b96c Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Sun, 21 Nov 1999 21:50:07 +0000 Subject: [PATCH] Stuf --- Makefile | 2 +- init.c | 3 ++- init/init.c | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index c982cc676..c715c0bd6 100644 --- a/Makefile +++ b/Makefile @@ -101,7 +101,7 @@ force: $(OBJECTS): busybox.def.h internal.h Makefile -install: busybox +install: busybox busybox.links ./install.sh $(PREFIX) whichversion: diff --git a/init.c b/init.c index ce2f237c7..75a659911 100644 --- a/init.c +++ b/init.c @@ -447,7 +447,8 @@ extern int init_main(int argc, char **argv) #ifndef DEBUG_INIT - if (getpid() != 1) { + /* Expect to be PID 1 iff we are run as init (not linuxrc) */ + if (getpid() != 1 && strstr(argv[0], "init")!=NULL ) { usage( "init\n\nInit is the parent of all processes.\n\n" "This version of init is designed to be run only by the kernel\n"); } diff --git a/init/init.c b/init/init.c index ce2f237c7..75a659911 100644 --- a/init/init.c +++ b/init/init.c @@ -447,7 +447,8 @@ extern int init_main(int argc, char **argv) #ifndef DEBUG_INIT - if (getpid() != 1) { + /* Expect to be PID 1 iff we are run as init (not linuxrc) */ + if (getpid() != 1 && strstr(argv[0], "init")!=NULL ) { usage( "init\n\nInit is the parent of all processes.\n\n" "This version of init is designed to be run only by the kernel\n"); }