summaryrefslogtreecommitdiffstats
path: root/move/make_live_tree_boot
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-11-05 09:41:09 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-11-05 09:41:09 +0000
commit880794c9b26f5aa1d8bab4261e55b4588531d5b4 (patch)
tree8315deec0cbeff3b53014260bbb1e8f1a790411c /move/make_live_tree_boot
parenta93e8dc4e4fb9b9fc7ce7c9f06561f99052fde6f (diff)
downloaddrakx-backup-do-not-use-880794c9b26f5aa1d8bab4261e55b4588531d5b4.tar
drakx-backup-do-not-use-880794c9b26f5aa1d8bab4261e55b4588531d5b4.tar.gz
drakx-backup-do-not-use-880794c9b26f5aa1d8bab4261e55b4588531d5b4.tar.bz2
drakx-backup-do-not-use-880794c9b26f5aa1d8bab4261e55b4588531d5b4.tar.xz
drakx-backup-do-not-use-880794c9b26f5aa1d8bab4261e55b4588531d5b4.zip
- more flexible totem tree symlinks build (based on totem.list)
- clean-up
Diffstat (limited to 'move/make_live_tree_boot')
-rwxr-xr-xmove/make_live_tree_boot17
1 files changed, 9 insertions, 8 deletions
diff --git a/move/make_live_tree_boot b/move/make_live_tree_boot
index f575184ec..bbd26f19d 100755
--- a/move/make_live_tree_boot
+++ b/move/make_live_tree_boot
@@ -15,25 +15,26 @@ Maybe you should remove it first with 'make_live_tree_boot -u'\n";
my $dest = $orig;
$dest =~ s|^$prefix|$light_prefix|;
+ my $dir = dirname($dest);
+ mkdir_p($dir);
+
if (-l $orig) {
- system('cp', '-a', $orig, $dest);
+ symlink readlink($orig), $dest;
} else {
my $link = $orig;
$link =~ s|^$prefix|/image_$live_name|;
- mkdir_p(dirname($dest));
rename $orig, $dest or die "moving $orig to $dest failed: $!\n";
-
symlink $link, $orig or die "symlinking from $dest to $orig failed: $!\n";
}
}
if ($live_name eq 'totem') {
- foreach my $dir ('/usr/share', '/usr/lib', '/usr/bin', '/usr') {
- foreach my $f (all("$prefix$dir")) {
- my $file = "$prefix$dir/$f";
- my $link = readlink($file) =~ /^\w/ ? readlink($file) : "/image$dir/$f";
- symlink $link, "$light_prefix$dir/$f";
+ foreach my $dir (chomp_(`cd $light_prefix ; find usr -type d`)) {
+ foreach my $f (all("$prefix/$dir")) {
+ my $file = "$prefix/$dir/$f";
+ my $link = readlink($file) =~ /^\w/ ? readlink($file) : "/image/$dir/$f";
+ symlink $link, "$light_prefix/$dir/$f";
}
}
}