summaryrefslogtreecommitdiffstats
path: root/perl-install/loopback.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-03-30 14:35:23 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-03-30 14:35:23 +0000
commit18011f2e9d699e37c6da8bec2d02de2b84a96a85 (patch)
treefdf782dfce0c929d31fe317a8b22c62518c19f56 /perl-install/loopback.pm
parented9b8286889057ba6a4983d4afb266d74cac20f0 (diff)
downloaddrakx-18011f2e9d699e37c6da8bec2d02de2b84a96a85.tar
drakx-18011f2e9d699e37c6da8bec2d02de2b84a96a85.tar.gz
drakx-18011f2e9d699e37c6da8bec2d02de2b84a96a85.tar.bz2
drakx-18011f2e9d699e37c6da8bec2d02de2b84a96a85.tar.xz
drakx-18011f2e9d699e37c6da8bec2d02de2b84a96a85.zip
no_comment
Diffstat (limited to 'perl-install/loopback.pm')
-rw-r--r--perl-install/loopback.pm19
1 files changed, 19 insertions, 0 deletions
diff --git a/perl-install/loopback.pm b/perl-install/loopback.pm
index b7073d5f5..baf8acd8f 100644
--- a/perl-install/loopback.pm
+++ b/perl-install/loopback.pm
@@ -127,6 +127,25 @@ sub verifFile {
undef;
}
+sub prepare_boot {
+ my ($prefix) = @_;
+ my $r = readlink "$prefix/boot";
+ unlink "$prefix/boot";
+ mkdir "$prefix/boot", 0755;
+ [$r, $prefix];
+}
+
+sub save_boot {
+ my ($loop_boot, $prefix) = @{$_[0]};
+
+ $loop_boot or return;
+
+ my @files = glob_("$prefix/boot/*");
+ commands::cp("-f", @files, $loop_boot) if @files;
+ commands::rm("-rf", "$prefix/boot");
+ symlink $loop_boot, "$prefix/boot";
+}
+
1;