diff options
-rwxr-xr-x | draklive | 20 | ||||
-rw-r--r-- | lib/MGA/DrakISO/Config.pm | 13 |
2 files changed, 14 insertions, 19 deletions
@@ -82,9 +82,9 @@ my @all = qw(root boot loop master); die "you must be root to run this program\n" if $>; my $build_object = 'MGA::DrakISO::LiveBuild'->new; -my $config_root = $MGA::DrakISO::Config::default_config_root; -my $config_path = $MGA::DrakISO::Config::default_config_path; -my $settings_path = $MGA::DrakISO::Config::default_settings_path; +my $config_root = '/etc/draklive'; +my $config_path = 'config/build.cfg'; +my $settings_path = 'config/settings.cfg'; GetOptions( "help" => sub { Pod::Usage::pod2usage('-verbose' => 1) }, @@ -122,7 +122,7 @@ __END__ =head1 NAME -draklive - A live distribution mastering tool +draklive - A live distribution ISO mastering tool =head1 SYNOPSIS @@ -151,10 +151,10 @@ draklive [options] defaults to current directory if it contains a configuration file, otherwise to "/etc/draklive" - --config <file> use this configuration file as live description - defaults to "config/live.cfg" + --config <file> use this configuration file to control the build + defaults to "config/build.cfg" - --settings <file> use this file as live settings (key=value format) + --settings <file> use this file as build settings (key=value format) defaults to "config/settings.cfg" --define key=value @@ -169,7 +169,7 @@ Examples: draklive --all - draklive --config config/live.cfg --root + draklive --config config/build.cfg --root =head1 OPTIONS @@ -178,7 +178,7 @@ Examples: =item B<--config> Makes draklive use the next argument as a configuration file. -This file should contain a hash describing the live distribution. +This file should contain a hash specifying the ISO makeup. See the "drakiso-live" page on the Mageia Wiki for details. =item B<--settings> @@ -207,7 +207,7 @@ Example keys: =head1 DESCRIPTION -B<draklive> builds a live distribution according to a configuration file, +B<draklive> builds a live distribution ISO according to a configuration file, creates a master image, and optionally installs it on a device. See L<https://wiki.mageia.org/en/drakiso-live> diff --git a/lib/MGA/DrakISO/Config.pm b/lib/MGA/DrakISO/Config.pm index a16e0cc..0a19a7c 100644 --- a/lib/MGA/DrakISO/Config.pm +++ b/lib/MGA/DrakISO/Config.pm @@ -12,10 +12,6 @@ use MGA::DrakISO::Media; use MGA::DrakISO::Mounts; use MGA::DrakISO::CustomMedia; -our $default_config_root = '/etc/draklive'; -our $default_config_path = 'config/live.cfg'; -our $default_settings_path = 'config/settings.cfg'; - sub read_config { my ($build, $config_root, $config_path, $settings_path) = @_; @@ -37,7 +33,7 @@ sub read_config { sub check_config { my ($build) = @_; unless (keys(%$build)) { - warn "no live definition\n"; + warn "no build definition\n"; Pod::Usage::pod2usage(); } #- check for minimum requirements @@ -48,11 +44,10 @@ sub check_config { sub complete_config { my ($build) = @_; - $build->{settings}{builddir} ||= '/var/lib/draklive/build'; - $build->{settings}{chroot} ||= '/var/lib/draklive/chroot'; + $build->{settings}{builddir} ||= '/var/lib/drakiso/build'; + $build->{settings}{chroot} ||= '/var/lib/drakiso/chroot'; $build->{settings}{arch} ||= chomp_(`rpm --eval '%{_target_cpu}'`); - $build->{media}{title} ||= "live"; $_ = MGA::DrakISO::Media::new($_) foreach ( $build->{media}, @@ -68,7 +63,7 @@ sub complete_config { sub dump_config { my ($build) = @_; use Data::Dumper; - print Data::Dumper->Dump([ $build ], [ "live" ]); + print Data::Dumper->Dump([ $build ], [ "build" ]); } 1; |