From 4508faca4c794f11171dbe143169d21efacde0a0 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 27 Jan 2010 17:25:38 +0000 Subject: factorize config path --- mdkapplet-config | 1 - mdkonline.pm | 4 +++- 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() { -- cgit v1.2.1