summaryrefslogtreecommitdiffstats
path: root/mdk-stage1
diff options
context:
space:
mode:
Diffstat (limited to 'mdk-stage1')
-rw-r--r--mdk-stage1/init.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/mdk-stage1/init.c b/mdk-stage1/init.c
index a618312bb..30385476b 100644
--- a/mdk-stage1/init.c
+++ b/mdk-stage1/init.c
@@ -429,7 +429,7 @@ int in_reboot(void)
int exit_value_proceed = 66;
-int main(int argc __attribute__ ((unused)), char **argv __attribute__ ((unused)))
+int main(int argc, char **argv)
{
pid_t installpid, childpid;
int wait_status;
@@ -437,6 +437,12 @@ int main(int argc __attribute__ ((unused)), char **argv __attribute__ ((unused))
int abnormal_termination = 0;
int end_stage2 = 0;
+ if (argc > 1 && argv[1][0] >= '0' && argv[1][0] <= '9') {
+ printf("This is no normal init, sorry.\n"
+ "Call `reboot' or `halt' directly.\n");
+ return 0;
+ }
+
/* getpid() != 1 should work, by linuxrc tends to get a larger pid */
testing = (getpid() > 50);