summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaouda Lo <daouda@mandriva.com>2004-03-16 11:23:59 +0000
committerDaouda Lo <daouda@mandriva.com>2004-03-16 11:23:59 +0000
commita6848352f61d528991c2918b2275dbb40d203e24 (patch)
treeb44856803184acb82c456271cd6f8767550614bb
parent3ed46857d72d2deb19027f7db3e923062f54b9e2 (diff)
downloadmgaonline-a6848352f61d528991c2918b2275dbb40d203e24.tar
mgaonline-a6848352f61d528991c2918b2275dbb40d203e24.tar.gz
mgaonline-a6848352f61d528991c2918b2275dbb40d203e24.tar.bz2
mgaonline-a6848352f61d528991c2918b2275dbb40d203e24.tar.xz
mgaonline-a6848352f61d528991c2918b2275dbb40d203e24.zip
- always write conf
-rwxr-xr-xmdkonline8
-rwxr-xr-xmdkupdate2
2 files changed, 6 insertions, 4 deletions
diff --git a/mdkonline b/mdkonline
index 5a1379cb..2467029d 100755
--- a/mdkonline
+++ b/mdkonline
@@ -255,8 +255,9 @@ sub setConf {
my $login = $o->{login}->get_text;
my $passwd = md5_hex($o->{passwd}->get_text);
my $boxname = $o->{machine}->get_text; my $country = getCountry($o->{country}->entry->get_text);
- my $key = $o->{currentkey};
- if ($o->{autoup}->get_active) { automatedUpgrades($login, $passwd, $boxname, $key, $country) }
+ my $key = $o->{currentkey}; my $auto = 'FALSE';
+ if ($o->{autoup}->get_active) { $auto = 'TRUE' };
+ automatedUpgrades($login, $passwd, $boxname, $key, $country, $auto);
writeWideConf($login, $boxname, $country);
}
sub init {
@@ -381,7 +382,7 @@ sub wait_msg {
}
sub remove_wait_msg { $_[0]->destroy }
sub automatedUpgrades {
- my ($login, $passwd, $boxname, $key, $country) = @_;
+ my ($login, $passwd, $boxname, $key, $country, $auto) = @_;
my ($r) = cat_('/etc/mandrake-release') =~ /release\s(\S+)/;
output "/root/.mdkupdate",
qq(# automatically generated file. Please don't edit
@@ -391,6 +392,7 @@ MACHINE=$boxname
VER=$r
CURRENTKEY=$key
COUNTRY=$country
+AUTO=$auto
);
output_p "/etc/cron.daily/mdkupdate",
qq(#!/bin/bash
diff --git a/mdkupdate b/mdkupdate
index 86bd5535..2c76b2a4 100755
--- a/mdkupdate
+++ b/mdkupdate
@@ -88,7 +88,7 @@ if(!$ret) {
if ($opt eq '--applet') {
system "MandrakeUpdate","--media=mdkupdate","--pkg-sel=$scheduled","--pkg-nosel=$nosheduled";
} elsif ($opt eq '--auto') {
- autoInstallRpms($c2h->{sched});
+ $o{AUTO} eq 'TRUE' and autoInstallRpms($c2h->{sched});
}
rpm_qa("/root/rpm_qa_installed_after");
my %new = getVarsFromSh($conffile);