summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mdk-stage1/stage1.c7
-rw-r--r--perl-install/Makefile2
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