From 296dc5bb53c430c8842ab7327d8a76b5750c64b4 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Mon, 18 Dec 2017 10:54:01 +0000 Subject: Start creating a new set of tools for generating Mageia ISO images. The aim is to share as much code as possible between the tool used to generate the Live ISOs and the tool used to generate the classic installer ISOs. This is derived from the user/martinw/use-grub2 branch of draklive. --- draklive2 | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'draklive2') diff --git a/draklive2 b/draklive2 index bbe6f34..4e90123 100755 --- a/draklive2 +++ b/draklive2 @@ -32,11 +32,11 @@ use Cwd; use File::Temp; use File::Copy qw(mv); use IO::Handle; #- autoflush -use MDV::Draklive::Utils; -use MDV::Draklive::Live; -use MDV::Draklive::Loopback; -use MDV::Draklive::Config; -use MDV::Draklive::Storage; +use MGA::DrakISO::Utils; +use MGA::DrakISO::Live; +use MGA::DrakISO::Loopback; +use MGA::DrakISO::Config; +use MGA::DrakISO::Storage; ############################################################################### # Common Helper Functions @@ -254,7 +254,7 @@ sub copy_files_to { my ($source, $dest, $o_opts) = @$_; $dest = $root . '/' . $dest; mkdir_p($dest =~ m|/$| ? $dest : dirname($dest)); - my @sources = MDV::Draklive::Utils::glob__($live->{settings}{config_root} . '/' . $source); + my @sources = MGA::DrakISO::Utils::glob__($live->{settings}{config_root} . '/' . $source); print STDERR "copying @sources to $dest\n"; cp_af(@sources, $dest); my $o_perm = $o_opts && $o_opts->{mode}; @@ -927,7 +927,7 @@ sub clean { ############################################################################### my @actions = ( - { name => 'dump-config', do => \&MDV::Draklive::Config::dump_config }, + { name => 'dump-config', do => \&MGA::DrakISO::Config::dump_config }, { name => 'clean', do => \&clean }, { name => 'install', do => \&install_system }, { name => 'post-install', do => \&post_install_system }, @@ -940,10 +940,10 @@ my @all = qw(install boot loop master); die "you must be root to run this program\n" if $>; -my $live_object = 'MDV::Draklive::Live'->new; -my $config_root = $MDV::Draklive::Config::default_config_root; -my $config_path = $MDV::Draklive::Config::default_config_path; -my $settings_path = $MDV::Draklive::Config::default_settings_path; +my $live_object = 'MGA::DrakISO::Live'->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; GetOptions( "help" => sub { Pod::Usage::pod2usage('-verbose' => 1) }, "all" => sub { $_->{to_run} = 1 foreach grep { member($_->{name}, @all) } @actions }, @@ -957,9 +957,9 @@ GetOptions( require standalone; every { !$_->{to_run} } @actions and Pod::Usage::pod2usage(); - MDV::Draklive::Config::read_config($live_object, $config_root, $config_path, $settings_path); - MDV::Draklive::Config::check_config($live_object); - MDV::Draklive::Config::complete_config($live_object); + MGA::DrakISO::Config::read_config($live_object, $config_root, $config_path, $settings_path); + MGA::DrakISO::Config::check_config($live_object); + MGA::DrakISO::Config::complete_config($live_object); foreach my $region ($live_object->{all_regions} ? sort(keys %{$live_object->{regions}}) : $live_object->{settings}{region}) { $region and print qq(=== proceeding with region "$region"\n); $live_object->{settings}{region} = $region; @@ -1026,13 +1026,13 @@ Examples: =item B<--config> -Makes draklive use the next argument as a configuration file. +Makes draklive2 use the next argument as a configuration file. This file should contain a hash describing the live distribution. See the "draklive2" page on the Mageia Wiki for details. =item B<--settings> -Makes draklive load the next argument as a file in key=value format into +Makes draklive2 load the next argument as a file in key=value format into the $live->{settings} hash ($live being the global live configuration hash). Built-in keys: -- cgit v1.2.1