From 7a9d8c4b6bfd13835b4df34fefd503edb34a9fd3 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Tue, 19 Dec 2017 20:19:04 +0000 Subject: Make configuration, settings, and documentation more generic. --- lib/MGA/DrakISO/Config.pm | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'lib') 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; -- cgit v1.2.1