From 8a6f99302d270bab22f7772d62c99ee473178121 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Wed, 12 Jan 2005 16:32:14 +0000 Subject: use /etc/init instead of /sbin/init to allow umounting clp in init --- mdk-stage1/stage1.c | 7 ++++++- perl-install/Makefile | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/mdk-stage1/stage1.c b/mdk-stage1/stage1.c index 836b13d2d..d22fc7cd1 100644 --- a/mdk-stage1/stage1.c +++ b/mdk-stage1/stage1.c @@ -568,11 +568,16 @@ void finish_preparing(void) copy_file("/etc/resolv.conf", SLASH_LOCATION "/etc/resolv.conf", NULL); mkdir(SLASH_LOCATION "/modules", 0755); copy_file("/modules/modules.dep", SLASH_LOCATION "/modules/modules.dep", NULL); + + if (!IS_RESCUE) { + copy_file(STAGE2_LOCATION "/etc/init", SLASH_LOCATION "/etc/init", NULL); + chmod(SLASH_LOCATION "/etc/init", 0755); + } umount("/tmp/tmpfs"); do_pivot_root(); - if (file_size("/sbin/init") == -1) + if (file_size(IS_RESCUE ? "/sbin/init" : "/etc/init") == -1) stg1_fatal_message("Fatal error giving hand to second stage."); if (shell_pid != 0) { diff --git a/perl-install/Makefile b/perl-install/Makefile index 77da601f1..3068f4d6c 100644 --- a/perl-install/Makefile +++ b/perl-install/Makefile @@ -215,7 +215,7 @@ ifeq (y,$(USE_PCMCIA)) ../tools/patch_pcmcia_config.pl $(DEST)/etc/pcmcia/config ../kernel/all.kernels/`cat ../kernel/all.kernels/.main`/modules.dep endif - cp -f $(STAGE1)/init-stage2 $(DEST)/usr/bin/init + cp -f $(STAGE1)/init-stage2 $(DEST)/etc/init find $(DEST) -name CVS | xargs rm -rf -- cgit v1.2.1