From e287c2b4d3cb08841b121aee7ce362dc5afbb86d Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Mon, 12 Jul 2004 07:01:10 +0000 Subject: use 'ip route show' to find the gateway device when no GATEWAYDEV is defined --- perl-install/standalone/net_applet | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'perl-install/standalone') diff --git a/perl-install/standalone/net_applet b/perl-install/standalone/net_applet index 265664c17..59fb3d781 100644 --- a/perl-install/standalone/net_applet +++ b/perl-install/standalone/net_applet @@ -99,12 +99,21 @@ sub checkNetwork { my %h = getVarsFromSh($gatewayconf); my $new_md5 = md5file($prog_name); # print "NEW($newmd5) = OLD($oldmd5)\n" + my $gd, $addrgd; if ($h{GATEWAYDEV}) { - my $addrgd = getIP($h{GATEWAYDEV}); - if ($addrgd) { - go2State('connected', $h{GATEWAYDEV}) - } else { go2State('disconnected', '') } - } else { die "No Gatewaydev defined" } + $addrgd = getIP($gd = $h{GATEWAYDEV}); + } else { + foreach (`/sbin/ip route show`) { + ($addrgd, $gd) = /^default\s+via\s+(\S+).*\s+dev\s+(\S+)/ and last; + } + } + + $gd or die "No Gatewaydev defined"; + + if ($addrgd) { + go2State('connected', $gd) + } else { go2State('disconnected', '') } + if ($new_md5 ne $current_md5) { exec($prog_name) }; } sub getIP { -- cgit v1.2.1 value='distro/mes6'>distro/mes6 Mageia Installer and base platform for many utilitiesThierry Vignaud [tv]
summaryrefslogtreecommitdiffstats
path: root/perl-install/lang.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-09-06 09:26:13 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-09-06 09:26:13 +0000
commit9bd6a9ea4f28b8b45a17fa8995547c179aecdebf (patch)
tree9664c51cca79367217a20a77afe7343885753c4e /perl-install/lang.pm
parentc4bdf0e86a587d4caf4091f9e9b23716e15a4f5c (diff)
downloaddrakx-9bd6a9ea4f28b8b45a17fa8995547c179aecdebf.tar
drakx-9bd6a9ea4f28b8b45a17fa8995547c179aecdebf.tar.gz
drakx-9bd6a9ea4f28b8b45a17fa8995547c179aecdebf.tar.bz2
drakx-9bd6a9ea4f28b8b45a17fa8995547c179aecdebf.tar.xz
drakx-9bd6a9ea4f28b8b45a17fa8995547c179aecdebf.zip
remove uneeded quotes
Diffstat (limited to 'perl-install/lang.pm')
-rw-r--r--perl-install/lang.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/perl-install/lang.pm b/perl-install/lang.pm
index 6c5a8c0d3..d28fb2501 100644
--- a/perl-install/lang.pm
+++ b/perl-install/lang.pm
@@ -638,8 +638,8 @@ my %IM2packages = (
generic => [ qw(scim scim-m17n scim-tables) ],
am => [ qw(scim scim-tables ) ],
ja => [ qw(scim-uim) ],
- 'ko' => [ qw(scim-hangul) ],
- 'zh' => [ qw(scim-chinese scim-tables) ],
+ ko => [ qw(scim-hangul) ],
+ zh => [ qw(scim-chinese scim-tables) ],
},
'scim+uim' => { generic => [ qw(scim-uim) ] },
'uim' => { generic => [ qw(uim-applet) ] },