summaryrefslogtreecommitdiffstats
path: root/move/move.pm
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2003-10-09 21:48:47 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2003-10-09 21:48:47 +0000
commit208870d500d245362fd6cc52f3bf28723475fe91 (patch)
tree993f4f626b8ff2bd66c05a73f88a1d81710fc073 /move/move.pm
parentbcafc07d0f9251906312f6d5492d8308ddcec49c (diff)
downloaddrakx-208870d500d245362fd6cc52f3bf28723475fe91.tar
drakx-208870d500d245362fd6cc52f3bf28723475fe91.tar.gz
drakx-208870d500d245362fd6cc52f3bf28723475fe91.tar.bz2
drakx-208870d500d245362fd6cc52f3bf28723475fe91.tar.xz
drakx-208870d500d245362fd6cc52f3bf28723475fe91.zip
mandrake-move can nearly start (shell starts, X config not done so X server currently crashes)
Diffstat (limited to 'move/move.pm')
-rw-r--r--move/move.pm27
1 files changed, 27 insertions, 0 deletions
diff --git a/move/move.pm b/move/move.pm
new file mode 100644
index 000000000..f7313b7dc
--- /dev/null
+++ b/move/move.pm
@@ -0,0 +1,27 @@
+package move; # $Id$ $
+
+use diagnostics;
+use strict;
+
+use common;
+use fs;
+use run_program;
+
+
+#- run very soon at stage2 start, setup things on tmpfs rw / that
+#- were not necessary to start stage2 itself (there were setup
+#- by stage1 of course)
+sub init {
+ mkdir "/$_" foreach qw(home mnt root etc var);
+ mkdir_p "/var/$_" foreach qw(log run spool lib/xkb lock/subsys);
+
+ symlinkf "/image/etc/$_", "/etc/$_" foreach qw(alternatives passwd group shadow man.config services shells pam.d security inputrc ld.so.conf DIR_COLORS bashrc profile profile.d rc.d init.d devfsd.conf devfs gtk-2.0 pango fonts);
+ symlinkf "/proc/mounts", "/etc/mtab";
+
+ fs::umount($_) foreach qw(/stage1/proc /stage1);
+ fs::mount("none", "/dev", "devfs", 0);
+ run_program::rooted('', '/sbin/devfsd', '/dev');
+}
+
+
+1;