summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2010-01-27 17:25:38 +0000
committerThierry Vignaud <tv@mandriva.org>2010-01-27 17:25:38 +0000
commit4508faca4c794f11171dbe143169d21efacde0a0 (patch)
treecc42fe3792adbc845ea315cb7201fdb6fb877dbd
parent01697c7de2d5972914bf38f2c8ef559ba599b4b9 (diff)
downloadmgaonline-4508faca4c794f11171dbe143169d21efacde0a0.tar
mgaonline-4508faca4c794f11171dbe143169d21efacde0a0.tar.gz
mgaonline-4508faca4c794f11171dbe143169d21efacde0a0.tar.bz2
mgaonline-4508faca4c794f11171dbe143169d21efacde0a0.tar.xz
mgaonline-4508faca4c794f11171dbe143169d21efacde0a0.zip
factorize config path
-rwxr-xr-xmdkapplet-config1
-rw-r--r--mdkonline.pm4
2 files changed, 3 insertions, 2 deletions
diff --git a/mdkapplet-config b/mdkapplet-config
index b691e942..adffac92 100755
--- a/mdkapplet-config
+++ b/mdkapplet-config
@@ -42,7 +42,6 @@ ugtk2::exit(0);
sub configure() {
my $w = ugtk2->new(N("Adding an additional package medium"), width => -1);
- my $config_file = '/etc/sysconfig/mdkapplet';
my %config = getVarsFromSh($config_file);
# convert from ms to seconds:
diff --git a/mdkonline.pm b/mdkonline.pm
index 4b5b1856..c9ee2df0 100644
--- a/mdkonline.pm
+++ b/mdkonline.pm
@@ -47,6 +47,7 @@ our @EXPORT = qw(find_current_distro
translate_product
xml2perl
%config
+ $config_file
$product_id
$root);
@@ -55,10 +56,11 @@ our $version = 2.67;
use log;
+our $config_file = '/etc/sysconfig/mdkapplet';
my $release_file = find { -f $_ } '/etc/mandriva-release', '/etc/mandrakelinux-release', '/etc/mandrake-release', '/etc/redhat-release';
sub read_config() {
- %config = getVarsFromSh('/etc/sysconfig/mdkapplet');
+ %config = getVarsFromSh($config_file);
}
sub get_stale_upgrade_filename() {