summaryrefslogtreecommitdiffstats
path: root/mdk-stage1
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2001-02-13 21:17:26 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2001-02-13 21:17:26 +0000
commitb5fcdb259c3131ee7f5379f324fa0767657e0515 (patch)
tree45b5660dd00a0a03206289c2bb0089c4db2396db /mdk-stage1
parent6a8efaf86001393b62802af5b07f777f425f0fb9 (diff)
downloaddrakx-backup-do-not-use-b5fcdb259c3131ee7f5379f324fa0767657e0515.tar
drakx-backup-do-not-use-b5fcdb259c3131ee7f5379f324fa0767657e0515.tar.gz
drakx-backup-do-not-use-b5fcdb259c3131ee7f5379f324fa0767657e0515.tar.bz2
drakx-backup-do-not-use-b5fcdb259c3131ee7f5379f324fa0767657e0515.tar.xz
drakx-backup-do-not-use-b5fcdb259c3131ee7f5379f324fa0767657e0515.zip
use exit code 66 for rescue
Diffstat (limited to 'mdk-stage1')
-rw-r--r--mdk-stage1/init.c9
-rw-r--r--mdk-stage1/stage1.c4
2 files changed, 7 insertions, 6 deletions
diff --git a/mdk-stage1/init.c b/mdk-stage1/init.c
index 2ea86be09..87cd2df65 100644
--- a/mdk-stage1/init.c
+++ b/mdk-stage1/init.c
@@ -309,6 +309,7 @@ void unmount_filesystems(void)
}
}
+int exit_value_rescue = 66;
int main(int argc, char **argv)
{
@@ -402,18 +403,18 @@ int main(int argc, char **argv)
end_stage2 = 1;
}
- if (!WIFEXITED(wait_status) || (WEXITSTATUS(wait_status) != 0 && WEXITSTATUS(wait_status) != 1)) {
+ if (!WIFEXITED(wait_status) || (WEXITSTATUS(wait_status) != 0 && WEXITSTATUS(wait_status) != exit_value_rescue)) {
printf("install exited abnormally :-( ");
if (WIFSIGNALED(wait_status))
printf("-- received signal %d", WTERMSIG(wait_status));
printf("\n");
abnormal_termination = 1;
- } else if (WIFEXITED(wait_status) && WEXITSTATUS(wait_status) == 1) {
+ } else if (WIFEXITED(wait_status) && WEXITSTATUS(wait_status) == exit_value_rescue) {
kill(klog_pid, 9);
- printf("exiting stage1-initializer -- giving hand to rescue\n");
+ printf("exiting init -- giving hand to rescue\n");
return 0;
} else
- printf("back to stage1-initializer control (install succeeded)\n");
+ printf("install succeeded\n");
if (testing)
return 0;
diff --git a/mdk-stage1/stage1.c b/mdk-stage1/stage1.c
index 8de538126..e0e5f76a8 100644
--- a/mdk-stage1/stage1.c
+++ b/mdk-stage1/stage1.c
@@ -214,7 +214,7 @@ static void expert_third_party_modules(void)
strcat(final_name, choice);
- results = ask_from_entries("Please enter the options:", questions, &answers, 24);
+ results = ask_from_entries("Please enter the options:", questions, &answers, 24, NULL);
if (results != RETURN_OK) {
umount(floppy_mount_location);
return expert_third_party_modules();
@@ -368,7 +368,7 @@ int main(int argc, char **argv, char **env)
write(fd, "0x103", sizeof("0x103")); /* ram3 */
#endif
close(fd);
- return 1;
+ return 66;
}
if (IS_TESTING)