diff options
author | Daouda Lo <daouda@mandriva.com> | 2005-09-15 17:43:13 +0000 |
---|---|---|
committer | Daouda Lo <daouda@mandriva.com> | 2005-09-15 17:43:13 +0000 |
commit | 726c740773992c06b19272f14c17cadaa96bcef3 (patch) | |
tree | 4883a916728bc1649d47cb1013a218112368809f | |
parent | 48da3a2e3ee946ed944d772c3a6919a8d3cab8df (diff) | |
download | mgaonline-726c740773992c06b19272f14c17cadaa96bcef3.tar mgaonline-726c740773992c06b19272f14c17cadaa96bcef3.tar.gz mgaonline-726c740773992c06b19272f14c17cadaa96bcef3.tar.bz2 mgaonline-726c740773992c06b19272f14c17cadaa96bcef3.tar.xz mgaonline-726c740773992c06b19272f14c17cadaa96bcef3.zip |
- merge 10.0, 10.1, 10.2 and 2006 code base
-rwxr-xr-x | mdkapplet | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -50,6 +50,8 @@ my $conffile = '/etc/sysconfig/mdkonline'; my $localdir = "$ENV{HOME}/.MdkOnline"; my $localfile = "$localdir/mdkonline"; +my $release = mdkonline::get_release(); + #compatibility mkdir_p($localdir) if !-d $localdir; -e "$ENV{HOME}/.mdkonline" and system("mv", "$ENV{HOME}/.mdkonline", $localfile); @@ -209,13 +211,13 @@ sub refresh_contents { sub configNetwork() { logIt(N("Launching drakconnect\n")); system "/usr/sbin/drakconnect &" } sub installUpdates { my $binfile = '/usr/bin/mdkapplet'; - my $oldmd5 = common::md5file($binfile); + my $oldmd5 = $release <= 10.2 ? mdkonline::md5file($binfile) : common::md5file($binfile); logIt(N("Launching mdkupdate --applet\n")); system "/usr/sbin/mdkupdate", "--applet"; - my $newmd5 = common::md5file($binfile); + my $oldmd5 = $release <= 10.2 ? mdkonline::md5file($binfile) : common::md5file($binfile); if ($newmd5 ne $oldmd5) { logIt(N("Mandriva Online seems to be reinstalled, reloading applet ....")); exec('/usr/bin/mdkapplet') } #my $w = $in->wait_message(N("Please wait"), N("Check updates")); - silentCheck(); gtkflush(); + silentCheck(); gtkflush(); #undef $w; my $mdkupdate_status = cat_('/var/tmp/mdkupdate.log'); if ($mdkupdate_status && $mdkupdate_status !~ /OK/) { logIt($mdkupdate_status); $in->ask_warn(N("Mandriva Linux Updates Applet"), $mdkupdate_status) } @@ -335,12 +337,10 @@ sub go2State { defined $textvw and refresh_status($state); } sub isNetwork { - my $r = mdkonline::get_release(); - # my $h = mdkonline::get_distro_type(); my $network; - if ($r <= 10.0) { + if ($release <= 10.0) { $network = gethostbyname("mandrivaonline.com") ? 1 : 0; - } elsif ($r <= 10.2) { + } elsif ($release <= 10.2) { require network::netconnect; require network::tools; my ($netcnx, $netc, $intf) = ({}, {}, {}); |