summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2018-01-12 08:46:18 +0000
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2018-01-12 08:46:18 +0000
commit70d61bc7db7211347547476c16c254df94cb737d (patch)
treebd88a1156a807186ea27ac4081ac34cc1a7336a6
parentff30da3ebb107421372e2a1a6d37f7c189667f2b (diff)
downloaddrakiso-70d61bc7db7211347547476c16c254df94cb737d.tar
drakiso-70d61bc7db7211347547476c16c254df94cb737d.tar.gz
drakiso-70d61bc7db7211347547476c16c254df94cb737d.tar.bz2
drakiso-70d61bc7db7211347547476c16c254df94cb737d.tar.xz
drakiso-70d61bc7db7211347547476c16c254df94cb737d.zip
Export functions in Config package.
-rwxr-xr-xdrakclassic8
-rwxr-xr-xdraklive8
-rw-r--r--lib/MGA/DrakISO/Config.pm4
3 files changed, 12 insertions, 8 deletions
diff --git a/drakclassic b/drakclassic
index 839b997..563ebc2 100755
--- a/drakclassic
+++ b/drakclassic
@@ -65,7 +65,7 @@ sub clean {
###############################################################################
my @actions = (
- { name => 'dump-config', do => \&MGA::DrakISO::Config::dump_config },
+ { name => 'dump-config', do => \&dump_config },
{ name => 'clean', do => \&clean },
{ name => 'media', do => \&prepare_media },
{ name => 'boot', do => \&prepare_iso_bootloader },
@@ -93,9 +93,9 @@ GetOptions(
require standalone;
every { !$_->{to_run} } @actions and Pod::Usage::pod2usage();
- MGA::DrakISO::Config::read_config($build_object, $config_root, $config_path, $settings_path);
- MGA::DrakISO::Config::check_config($build_object);
- MGA::DrakISO::Config::complete_config($build_object);
+ read_config($build_object, $config_root, $config_path, $settings_path);
+ check_config($build_object);
+ complete_config($build_object);
if ($build_object->{settings}{repository} =~ /^http:|^ftp:/) {
die "Sorry - remote repositories are not supported yet.";
diff --git a/draklive b/draklive
index e5cd63d..ce2e014 100755
--- a/draklive
+++ b/draklive
@@ -79,7 +79,7 @@ sub prepare_boot {
###############################################################################
my @actions = (
- { name => 'dump-config', do => \&MGA::DrakISO::Config::dump_config },
+ { name => 'dump-config', do => \&dump_config },
{ name => 'clean', do => \&clean },
{ name => 'root', do => \&prepare_root },
{ name => 'root-install', do => \&install_live_system },
@@ -112,9 +112,9 @@ GetOptions(
require standalone;
every { !$_->{to_run} } @actions and Pod::Usage::pod2usage();
- MGA::DrakISO::Config::read_config($build_object, $config_root, $config_path, $settings_path);
- MGA::DrakISO::Config::check_config($build_object);
- MGA::DrakISO::Config::complete_config($build_object);
+ read_config($build_object, $config_root, $config_path, $settings_path);
+ check_config($build_object);
+ complete_config($build_object);
$build_object->{mount} ||= MGA::DrakISO::Mounts::volatile_squash_union();
diff --git a/lib/MGA/DrakISO/Config.pm b/lib/MGA/DrakISO/Config.pm
index e78d595..ed1ca63 100644
--- a/lib/MGA/DrakISO/Config.pm
+++ b/lib/MGA/DrakISO/Config.pm
@@ -33,6 +33,10 @@ use Cwd 'getcwd';
#- these modules can be used from config files
use MGA::DrakISO::Mounts;
+use Exporter;
+our @ISA = qw(Exporter);
+our @EXPORT = qw(read_config check_config complete_config dump_config);
+
sub read_config {
my ($build, $config_root, $config_path, $settings_path) = @_;