summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2017-12-19 20:19:04 +0000
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2017-12-19 20:19:04 +0000
commit7a9d8c4b6bfd13835b4df34fefd503edb34a9fd3 (patch)
tree2695f79148b0af2c2a79d559d24efdc973b75d01 /lib
parent3a4fbf8714e692a86462766a44080a16ed5e816b (diff)
downloaddrakiso-7a9d8c4b6bfd13835b4df34fefd503edb34a9fd3.tar
drakiso-7a9d8c4b6bfd13835b4df34fefd503edb34a9fd3.tar.gz
drakiso-7a9d8c4b6bfd13835b4df34fefd503edb34a9fd3.tar.bz2
drakiso-7a9d8c4b6bfd13835b4df34fefd503edb34a9fd3.tar.xz
drakiso-7a9d8c4b6bfd13835b4df34fefd503edb34a9fd3.zip
Make configuration, settings, and documentation more generic.
Diffstat (limited to 'lib')
-rw-r--r--lib/MGA/DrakISO/Config.pm13
1 files changed, 4 insertions, 9 deletions
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;