summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-12-26 18:42:45 +0000
committerOlivier Blin <oblin@mandriva.org>2005-12-26 18:42:45 +0000
commita8a23699a31472804ae32000f81817d8ee497be7 (patch)
tree8ed1a989e20c2b9c8a3ce75c9a93154a20186d41
parent9a31656af6f87ad408e64d8ab3eaa5e0e03d3bef (diff)
downloaddrakx-a8a23699a31472804ae32000f81817d8ee497be7.tar
drakx-a8a23699a31472804ae32000f81817d8ee497be7.tar.gz
drakx-a8a23699a31472804ae32000f81817d8ee497be7.tar.bz2
drakx-a8a23699a31472804ae32000f81817d8ee497be7.tar.xz
drakx-a8a23699a31472804ae32000f81817d8ee497be7.zip
move default prefix in a dedicated hash
-rwxr-xr-xtools/draklive20
1 files changed, 10 insertions, 10 deletions
diff --git a/tools/draklive b/tools/draklive
index b70abf234..3471de491 100755
--- a/tools/draklive
+++ b/tools/draklive
@@ -664,16 +664,6 @@ sub record_onthefly {
sub complete_config {
my ($live) = @_;
- add2hash($live->{prefix} ||= {},
- {
- media_mnt => '/media',
- live_mnt => '/live',
- loopbacks => '/loopbacks',
- images => '/images',
- boot => '/boot',
- initrd => '/initrd',
- });
-
#- set unsupplied config dirs
$live->{workdir} ||= '/tmp/draklive';
$live->{mnt} ||= $live->{workdir} . "/mnt";
@@ -690,6 +680,15 @@ sub clean {
rm_rf($_) foreach grep { -e $_ } $live->{workdir}, $live->{system}{root};
}
+my $default_prefix = {
+ media_mnt => '/media',
+ live_mnt => '/live',
+ loopbacks => '/loopbacks',
+ images => '/images',
+ boot => '/boot',
+ initrd => '/initrd',
+};
+
my @actions = (
{ name => 'clean', do => \&clean },
{ name => 'install', do => \&install_system },
@@ -723,6 +722,7 @@ unless (keys(%live)) {
pod2usage();
}
complete_config(\%live);
+add2hash($live{prefix} ||= {}, $default_prefix);
require standalone;
every { !$_->{to_run} } @actions and die 'nothing to do';