diff options
author | Eugeni Dodonov <eugeni@mandriva.org> | 2009-03-25 18:34:52 +0000 |
---|---|---|
committer | Eugeni Dodonov <eugeni@mandriva.org> | 2009-03-25 18:34:52 +0000 |
commit | b23eaa9ee3e594b11fd906c5fa53c135e16a4670 (patch) | |
tree | 539a1172e49188853b2ef103168f315e144117af | |
parent | 1c17d360f5f6809d4935f18a16826340f33f651a (diff) | |
download | drakx-net-b23eaa9ee3e594b11fd906c5fa53c135e16a4670.tar drakx-net-b23eaa9ee3e594b11fd906c5fa53c135e16a4670.tar.gz drakx-net-b23eaa9ee3e594b11fd906c5fa53c135e16a4670.tar.bz2 drakx-net-b23eaa9ee3e594b11fd906c5fa53c135e16a4670.tar.xz drakx-net-b23eaa9ee3e594b11fd906c5fa53c135e16a4670.zip |
Added support for 3G connections which do not require PIN number (#48837).
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | lib/network/connection/cellular_card.pm | 10 |
2 files changed, 9 insertions, 3 deletions
@@ -1,3 +1,5 @@ +- cellular backend: + o added support for connections which do not require PIN number (#48837) - ethernet backend: o always writing udev rules when saving settings (#48973) diff --git a/lib/network/connection/cellular_card.pm b/lib/network/connection/cellular_card.pm index e2753d6..d20540c 100644 --- a/lib/network/connection/cellular_card.pm +++ b/lib/network/connection/cellular_card.pm @@ -107,12 +107,12 @@ sub get_networks { sub get_hardware_settings { my ($self) = @_; - [ { label => N("PIN number (4 digits)"), val => \$self->{hardware}{pin}, hidden => 1 } ]; + [ { label => N("PIN number (4 digits). Leave empty if PIN is not required."), val => \$self->{hardware}{pin}, hidden => 1 } ]; } sub check_hardware_settings { my ($self) = @_; - if ($self->{hardware}{pin} !~ /^[0-9]{4}$/) { + if ($self->{hardware}{pin} !~ /(^$|^[0-9]{4}$)/) { $self->{hardware}{error} = translate($wrong_pin_error); return 0; } @@ -192,7 +192,11 @@ sub check_device { sub check_hardware { my ($self) = @_; - to_bool(run_program::rooted($::prefix, 'comgt', '>', '/dev/null', '-d', $self->get_control_device, 'PIN')); + if ($self->{hardware}{pin}) { + to_bool(run_program::rooted($::prefix, 'comgt', '>', '/dev/null', '-d', $self->get_control_device, 'PIN')); + } else { + to_bool(run_program::rooted($::prefix, 'comgt', '>', '/dev/null', '-d', $self->get_control_device)); + } } sub configure_hardware { |