diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2000-03-30 14:35:23 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2000-03-30 14:35:23 +0000 |
commit | 18011f2e9d699e37c6da8bec2d02de2b84a96a85 (patch) | |
tree | fdf782dfce0c929d31fe317a8b22c62518c19f56 /perl-install/loopback.pm | |
parent | ed9b8286889057ba6a4983d4afb266d74cac20f0 (diff) | |
download | drakx-backup-do-not-use-18011f2e9d699e37c6da8bec2d02de2b84a96a85.tar drakx-backup-do-not-use-18011f2e9d699e37c6da8bec2d02de2b84a96a85.tar.gz drakx-backup-do-not-use-18011f2e9d699e37c6da8bec2d02de2b84a96a85.tar.bz2 drakx-backup-do-not-use-18011f2e9d699e37c6da8bec2d02de2b84a96a85.tar.xz drakx-backup-do-not-use-18011f2e9d699e37c6da8bec2d02de2b84a96a85.zip |
no_comment
Diffstat (limited to 'perl-install/loopback.pm')
-rw-r--r-- | perl-install/loopback.pm | 19 |
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; |