From 065557f6287bd87a4e52bea28db5a0b9c4a98b76 Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Mon, 28 Oct 2013 23:11:33 +0000 Subject: stage1: Remove the counter from init. init is now solely responsibe for running stage2 (be it install or rescue) as stage1 is now run earlier by dracut. --- mdk-stage1/init.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/mdk-stage1/init.c b/mdk-stage1/init.c index 24615704a..f774484d7 100644 --- a/mdk-stage1/init.c +++ b/mdk-stage1/init.c @@ -57,7 +57,6 @@ static inline long reboot(unsigned int command) #endif -#define BINARY "/sbin/stage1" #define BINARY_STAGE2 "/usr/bin/runinstall2" @@ -466,7 +465,6 @@ int main(int argc, char **argv) pid_t installpid, childpid; int wait_status; int fd; - int counter = 0; int abnormal_termination = 0; if (argc > 1 && argv[1][0] >= '0' && argv[1][0] <= '9') { @@ -524,14 +522,12 @@ int main(int argc, char **argv) do { - if (counter == 1) { - printf("proceeding, please wait...\n"); - } + printf("proceeding, please wait...\n"); if (!(installpid = fork())) { /* child */ char * child_argv[2]; - child_argv[0] = counter == 0 ? BINARY : BINARY_STAGE2; + child_argv[0] = BINARY_STAGE2; child_argv[1] = NULL; execve(child_argv[0], child_argv, env); @@ -542,8 +538,6 @@ int main(int argc, char **argv) do { childpid = wait4(-1, &wait_status, 0, NULL); } while (childpid != installpid); - - counter++; } while (WIFEXITED(wait_status) && WEXITSTATUS(wait_status) == exit_value_restart); /* allow Ctrl Alt Del to reboot */ -- cgit v1.2.1