From 14da6683acda76b094c886508c79dc78fbb5be11 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Wed, 29 Oct 2008 00:57:05 +0000 Subject: extract predefined and custom mounts/fs in MDV::Draklive::Mounts and MDV::Draklive::CustomMedia modules (breaks config files) --- draklive | 104 ++------------------------------------------------------------- 1 file changed, 2 insertions(+), 102 deletions(-) (limited to 'draklive') diff --git a/draklive b/draklive index 3631b00..59cbacb 100755 --- a/draklive +++ b/draklive @@ -39,108 +39,8 @@ use MDV::Draklive::Media; use MDV::Draklive::Progress; use MDV::Draklive::Loopback; use MDV::Draklive::Initrd; - -my $dir_distrib_sqfs = { - mountpoint => '/distrib', - type => 'squashfs', - path => '/distrib', - # perl -MMDK::Common -e 'print map_index { (32767 - $::i) . " $_" } grep { !m,^/(?:dev|proc|sys|live/distrib), } uniq(<>)' < bootlog.list > config/distrib.sort - sort => "config/distrib.sort", - build_from => '/', -}; -my $dir_memory = { - mountpoint => '/memory', - type => 'tmpfs', -}; - -my $dir_modules = { - mountpoint => '/modules', - type => 'modules', - path => '/modules', - list => 'modules.lst', -}; - -# this is not unused (it can be used from config file): -my %predefined = ( - mounts => { - simple_union => { - root => '/union', - overlay => 'unionfs', - dirs => [ - { - mountpoint => '/media', - type => 'plain', - }, - $dir_memory, - ], - }, - squash_rw_union => { - root => '/union', - overlay => 'unionfs', - dirs => [ - $dir_distrib_sqfs, - { - mountpoint => '/media/system', - type => 'plain', - }, - ], - }, - }, -); - -# this is not unused (it can be used from config file): -my %custom = ( - fs => { - nfs => sub { - my ($module, $client, $path) = @_; - ( - fs => 'nfs', - modules => 'nfs', - extra_modules => [ $module ], - pre => "ifconfig eth0 $client up", - source => $path, - ); - }, - }, - mounts => { - volatile_squash_union => sub { - my ($o_modules) = @_; - { - root => '/union', - overlay => 'unionfs', - dirs => [ - $dir_distrib_sqfs, - if_($o_modules, $dir_modules), - $dir_memory, - ], - }; - }, - squash_union => sub { - my ($default_size, $o_min_size, $o_modules) = @_; - { - root => '/union', - overlay => 'unionfs', - dirs => [ - $dir_distrib_sqfs, - if_($o_modules, $dir_modules), - { - mountpoint => '/system', - type => 'loopfs', - pre_allocate => $default_size, - if_(defined $o_min_size, min_size => $o_min_size), - fs => 'ext2', - path => '/system' - }, - { - mountpoint => '/system', - type => 'tmpfs', - fallback => 1, - }, - ], - }; - }, - }, -); +use MDV::Draklive::Mounts; +use MDV::Draklive::CustomMedia; my %storage = ( cdrom => { -- cgit v1.2.1