summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/init.c
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2001-02-07 20:18:21 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2001-02-07 20:18:21 +0000
commit13e551b64c1c3cd1c6a2025dd9328f908b9f3f39 (patch)
treeb61c877d6c93222ced93769aa9845a73d51d0fea /mdk-stage1/init.c
parent57f0c1abdba4b36f2b29477643873b606e17feb2 (diff)
downloaddrakx-backup-do-not-use-13e551b64c1c3cd1c6a2025dd9328f908b9f3f39.tar
drakx-backup-do-not-use-13e551b64c1c3cd1c6a2025dd9328f908b9f3f39.tar.gz
drakx-backup-do-not-use-13e551b64c1c3cd1c6a2025dd9328f908b9f3f39.tar.bz2
drakx-backup-do-not-use-13e551b64c1c3cd1c6a2025dd9328f908b9f3f39.tar.xz
drakx-backup-do-not-use-13e551b64c1c3cd1c6a2025dd9328f908b9f3f39.zip
- use description of network cards when you have to select between interfaces; has accuracy even in the case of multiple interface for a given kernel module
- write down a small "shell" to change parameters on the fly (needs compile option SPAWN_INTERACTIVE)
Diffstat (limited to 'mdk-stage1/init.c')
-rw-r--r--mdk-stage1/init.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/mdk-stage1/init.c b/mdk-stage1/init.c
index fb33c7480..fc48c68f2 100644
--- a/mdk-stage1/init.c
+++ b/mdk-stage1/init.c
@@ -311,17 +311,6 @@ void unmount_filesystems(void)
}
}
-int is_rescue()
-{
- int fd, size;
- char buf[512];
- if ((fd = open("/proc/cmdline", O_RDONLY, 0)) == -1)
- fatal_error("could not open /proc/cmdline");
- size = read(fd, buf, sizeof(buf));
- buf[size-1] = 0;
- close(fd);
- return (strstr(buf, "rescue") != NULL);
-}
int main(int argc, char **argv)
{
@@ -420,13 +409,13 @@ int main(int argc, char **argv)
end_stage2 = 1;
}
- if (!WIFEXITED(wait_status) || WEXITSTATUS(wait_status)) {
+ if (!WIFEXITED(wait_status) || (WEXITSTATUS(wait_status) != 0 && WEXITSTATUS(wait_status) != 1)) {
printf("install exited abnormally :-( ");
if (WIFSIGNALED(wait_status))
printf("-- received signal %d", WTERMSIG(wait_status));
printf("\n");
abnormal_termination = 1;
- } else if (is_rescue()) {
+ } else if (WIFEXITED(wait_status) && WEXITSTATUS(wait_status) == 1) {
kill(klog_pid, 9);
printf("exiting stage1-initializer -- giving hand to rescue\n");
return 0;