diff options
author | Olivier Blin <oblin@mandriva.org> | 2005-12-26 18:42:45 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.org> | 2005-12-26 18:42:45 +0000 |
commit | a8a23699a31472804ae32000f81817d8ee497be7 (patch) | |
tree | 8ed1a989e20c2b9c8a3ce75c9a93154a20186d41 /tools/draklive | |
parent | 9a31656af6f87ad408e64d8ab3eaa5e0e03d3bef (diff) | |
download | drakx-a8a23699a31472804ae32000f81817d8ee497be7.tar drakx-a8a23699a31472804ae32000f81817d8ee497be7.tar.gz drakx-a8a23699a31472804ae32000f81817d8ee497be7.tar.bz2 drakx-a8a23699a31472804ae32000f81817d8ee497be7.tar.xz drakx-a8a23699a31472804ae32000f81817d8ee497be7.zip |
move default prefix in a dedicated hash
Diffstat (limited to 'tools/draklive')
-rwxr-xr-x | tools/draklive | 20 |
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'; |