summaryrefslogtreecommitdiffstats
path: root/mdk-stage1
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-01-12 16:32:14 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-01-12 16:32:14 +0000
commit8a6f99302d270bab22f7772d62c99ee473178121 (patch)
tree430146ef8e3f10f0a75d69291ccffcd3b6ee4786 /mdk-stage1
parent31183629e0c1a187e6bee07bea2a4f20f1873f77 (diff)
downloaddrakx-8a6f99302d270bab22f7772d62c99ee473178121.tar
drakx-8a6f99302d270bab22f7772d62c99ee473178121.tar.gz
drakx-8a6f99302d270bab22f7772d62c99ee473178121.tar.bz2
drakx-8a6f99302d270bab22f7772d62c99ee473178121.tar.xz
drakx-8a6f99302d270bab22f7772d62c99ee473178121.zip
use /etc/init instead of /sbin/init to allow umounting clp in init
Diffstat (limited to 'mdk-stage1')
-rw-r--r--mdk-stage1/stage1.c7
1 files changed, 6 insertions, 1 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) {