diff options
author | Olivier Blin <oblin@mandriva.org> | 2005-04-07 10:51:24 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.org> | 2005-04-07 10:51:24 +0000 |
commit | 833676ec48c765f448c9d93eb2b69e93b104f1a3 (patch) | |
tree | 2f1d9bc0f4d3690c108dfcc7634cdb1831b62352 /perl-install/standalone/drakroam | |
parent | 59f9a21b8acc9cf7f58504c6c6402e77c49d78fd (diff) | |
download | drakx-backup-do-not-use-833676ec48c765f448c9d93eb2b69e93b104f1a3.tar drakx-backup-do-not-use-833676ec48c765f448c9d93eb2b69e93b104f1a3.tar.gz drakx-backup-do-not-use-833676ec48c765f448c9d93eb2b69e93b104f1a3.tar.bz2 drakx-backup-do-not-use-833676ec48c765f448c9d93eb2b69e93b104f1a3.tar.xz drakx-backup-do-not-use-833676ec48c765f448c9d93eb2b69e93b104f1a3.zip |
don't truncate default gateway (#15247)
Diffstat (limited to 'perl-install/standalone/drakroam')
-rwxr-xr-x | perl-install/standalone/drakroam | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/perl-install/standalone/drakroam b/perl-install/standalone/drakroam index 930bca1fc..acd6e9448 100755 --- a/perl-install/standalone/drakroam +++ b/perl-install/standalone/drakroam @@ -33,11 +33,12 @@ use run_program; use Glib qw(TRUE FALSE); use ugtk2 qw(:create :helpers :wrappers); use Gtk2::SimpleList; +use Socket; require_root_capability(); # global settings -my $route = '/sbin/route'; +my $route = '/sbin/route -n'; my $IWList = '/sbin/iwlist'; my $IWConfig = '/sbin/iwconfig'; my $IFConfig = '/sbin/ifconfig'; @@ -266,7 +267,7 @@ sub UpdateStatus() { if (/inet addr:(\S*)\s/) { $CurrentIP = $1 } } foreach (run_program::get_stdout($route)) { - if (/default\s*(\S*)\s/) { $CurrentGW = $1 } + if (/^0.0.0.0\s*(\S*)\s/) { $CurrentGW = gethostbyaddr(inet_aton($1), AF_INET) } else { $CurrentGW = "---.---.---.---" } } $NetLabel->set_text(N("Network: %s", $CurrentNet)); |