summaryrefslogtreecommitdiffstats
path: root/move/move.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-11-05 12:36:42 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-11-05 12:36:42 +0000
commitf5708de38058667732eb6c02610635bc3bc00d8d (patch)
tree24fd1ed00c35b8a2869e736d036340371ac5218c /move/move.pm
parentdf40212f253267dbc9c3ad34d5a18b8e2fb2abdd (diff)
downloaddrakx-f5708de38058667732eb6c02610635bc3bc00d8d.tar
drakx-f5708de38058667732eb6c02610635bc3bc00d8d.tar.gz
drakx-f5708de38058667732eb6c02610635bc3bc00d8d.tar.bz2
drakx-f5708de38058667732eb6c02610635bc3bc00d8d.tar.xz
drakx-f5708de38058667732eb6c02610635bc3bc00d8d.zip
when /image/etc/xxx is a symlink, create /etc/xxx directly to this symlink
Diffstat (limited to 'move/move.pm')
-rw-r--r--move/move.pm12
1 files changed, 10 insertions, 2 deletions
diff --git a/move/move.pm b/move/move.pm
index ef7f75438..9a1abdf8a 100644
--- a/move/move.pm
+++ b/move/move.pm
@@ -12,6 +12,14 @@ use lang;
my @ALLOWED_LANGS = qw(en_US fr es it de);
+sub symlinkf_short {
+ my ($dest, $file) = @_;
+ if (my $l = readlink $dest) {
+ $dest = $l if $l =~ m!^/!;
+ }
+ symlinkf($dest, $file);
+}
+
#- 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)
@@ -33,12 +41,12 @@ sub init {
system("cp -R /image/etc/cups/* /etc/cups");
#- ro things
- symlinkf "/image/etc/$_", "/etc/$_"
+ symlinkf_short("/image/etc/$_", "/etc/$_")
foreach qw(alternatives shadow man.config services shells pam.d security inputrc ld.so.conf
DIR_COLORS bashrc profile profile.d rc.d init.d devfsd.conf gtk-2.0 pango fonts modules.devfs
dynamic gnome-vfs-2.0 gnome-vfs-mime-magic gtk gconf menu menu-methods nsswitch.conf default login.defs
skel ld.so.cache openoffice xinetd.d);
- symlinkf "/image/etc/X11/$_", "/etc/X11/$_"
+ symlinkf_short("/image/etc/X11/$_", "/etc/X11/$_")
foreach qw(encodings.dir app-defaults applnk fs lbxproxy proxymngr rstart wmsession.d xinit.d xinit xkb xserver xsm);
#- create remaining /etc and /var subdirectories if not already copied or symlinked,