From a8a23699a31472804ae32000f81817d8ee497be7 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Mon, 26 Dec 2005 18:42:45 +0000 Subject: move default prefix in a dedicated hash --- tools/draklive | 20 ++++++++++---------- 1 file 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'; -- cgit v1.2.1