diff options
author | Daouda Lo <daouda@mandriva.com> | 2005-03-23 15:37:59 +0000 |
---|---|---|
committer | Daouda Lo <daouda@mandriva.com> | 2005-03-23 15:37:59 +0000 |
commit | a0ea2b2af3aaa7bf2815ffb51b70e6be045565ae (patch) | |
tree | b5ac96fa6c642210a0dbd28257440a6343156b4a /mdkonline.pm | |
parent | 116f09eb59e6c7aaa1ea6a813ae0bc471d9d80ee (diff) | |
download | mgaonline-a0ea2b2af3aaa7bf2815ffb51b70e6be045565ae.tar mgaonline-a0ea2b2af3aaa7bf2815ffb51b70e6be045565ae.tar.gz mgaonline-a0ea2b2af3aaa7bf2815ffb51b70e6be045565ae.tar.bz2 mgaonline-a0ea2b2af3aaa7bf2815ffb51b70e6be045565ae.tar.xz mgaonline-a0ea2b2af3aaa7bf2815ffb51b70e6be045565ae.zip |
- use brand new www-browser
Diffstat (limited to 'mdkonline.pm')
-rw-r--r-- | mdkonline.pm | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/mdkonline.pm b/mdkonline.pm index 8bc1dc8c..1f73ecab 100644 --- a/mdkonline.pm +++ b/mdkonline.pm @@ -22,10 +22,11 @@ sub get_release() { ($release) } -sub get_distro_type() { - my $d; - cat_($release_file) =~ /(corporate|mnf|x86_64)/i, and $d = lc($1); - $d +sub get_distro_type { + my $release = cat_($release_file); + my ($arch) = $release =~ /\s+for\s+(\w+)/; + my ($name) = $release =~ /(corporate|mnf)/i; + { name => lc($name), arch => $arch }; } sub get_from_URL { @@ -41,20 +42,7 @@ sub get_from_URL { sub get_site { my $link = shift; $link .= join('', @_); - my $b = browser(); - system("$b " . $link . "&") -} - -sub browser() { - require any; - my $wm = any::running_window_manager(); - member($wm, 'kwin', 'gnome-session') or $wm = 'other'; - my %Br = ( - 'kwin' => 'webclient-kde', - 'gnome-session' => 'webclient-gnome', - 'other' => $ENV{BROWSER} || find { -x "/usr/bin/$_" } qw(epiphany mozilla konqueror galeon) - ); - $Br{$wm} + system("/usr/bin/www-browser " . $link . "&"); } sub subscribe_online { @@ -184,7 +172,7 @@ sub clean_confdir { sub hw_upload { my ($login, $passwd, $hostname) = @_; my $hw_exec = '/usr/sbin/hwdb_add_system'; - -x $hw_exec and system("HWDB_PASSWD=$passwd $hw_exec $login $hostname &"); + -x $hw_exec && !-s '/etc/sysconfig/mdkonline' and system("HWDB_PASSWD=$passwd $hw_exec $login $hostname &"); } sub automated_upgrades { |