summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xmdkapplet2
-rw-r--r--mdkonline.pm4
2 files changed, 5 insertions, 1 deletions
diff --git a/mdkapplet b/mdkapplet
index eb7c2eab..80aee539 100755
--- a/mdkapplet
+++ b/mdkapplet
@@ -52,7 +52,7 @@ if (!find { $_ eq '--auto-update' } @ARGV) {
my $online_site = "http://www.mandrivalinux.com/";
my ($menu, $timeout, $network_timeout, $state_global, $sub_state);
-%config = getVarsFromSh('/etc/sysconfig/mdkapplet');
+read_config();
$config{UPDATE_FREQUENCY} ||= 3*60*60; # default to 3hours
if ($::testing) {
$config{FIRST_CHECK_DELAY} = 1 * 1000; # 1 second
diff --git a/mdkonline.pm b/mdkonline.pm
index 6378ccca..4b5b1856 100644
--- a/mdkonline.pm
+++ b/mdkonline.pm
@@ -43,6 +43,7 @@ our @EXPORT = qw(find_current_distro
is_enterprise_media_supported
is_extmaint_supported
is_restricted_media_supported
+ read_config
translate_product
xml2perl
%config
@@ -56,6 +57,9 @@ use log;
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');
+}
sub get_stale_upgrade_filename() {
'/var/lib/urpmi/stale_upgrade_in_progress';