summaryrefslogtreecommitdiffstats
path: root/mdk-stage1
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2003-11-26 18:10:33 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2003-11-26 18:10:33 +0000
commitf2e8d9959cd200ef7c1a1588df8b84f57bf6ff27 (patch)
treed722653fea64f962f096218bd7a0b6e3d4273107 /mdk-stage1
parent082e3c50e945c325fd2178e3992d7a797e44767c (diff)
downloaddrakx-backup-do-not-use-f2e8d9959cd200ef7c1a1588df8b84f57bf6ff27.tar
drakx-backup-do-not-use-f2e8d9959cd200ef7c1a1588df8b84f57bf6ff27.tar.gz
drakx-backup-do-not-use-f2e8d9959cd200ef7c1a1588df8b84f57bf6ff27.tar.bz2
drakx-backup-do-not-use-f2e8d9959cd200ef7c1a1588df8b84f57bf6ff27.tar.xz
drakx-backup-do-not-use-f2e8d9959cd200ef7c1a1588df8b84f57bf6ff27.zip
consider than presence of /tmp/reboot means a clean exit
Diffstat (limited to 'mdk-stage1')
-rw-r--r--mdk-stage1/init.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/mdk-stage1/init.c b/mdk-stage1/init.c
index e081ca7cd..f08e423f1 100644
--- a/mdk-stage1/init.c
+++ b/mdk-stage1/init.c
@@ -422,7 +422,9 @@ int main(int argc __attribute__ ((unused)), char **argv __attribute__ ((unused))
end_stage2 = 1;
}
- if (!WIFEXITED(wait_status) || (WEXITSTATUS(wait_status) != 0 && WEXITSTATUS(wait_status) != exit_value_proceed)) {
+ if ((fd = open("/tmp/reboot", O_RDONLY, 0)) > 0) {
+ close(fd);
+ } else if (!WIFEXITED(wait_status) || (WEXITSTATUS(wait_status) != 0 && WEXITSTATUS(wait_status) != exit_value_proceed)) {
printf("exited abnormally :-( ");
if (WIFSIGNALED(wait_status))
printf("-- received signal %d", WTERMSIG(wait_status));
@@ -432,7 +434,9 @@ int main(int argc __attribute__ ((unused)), char **argv __attribute__ ((unused))
kill(klog_pid, 9);
printf("proceeding, please wait...\n");
return 0;
- } else {
+ }
+
+ if (!abnormal_termination) {
int i;
for (i=0; i<50; i++)
printf("\n"); /* cleanup startkde messages */