summaryrefslogtreecommitdiffstats
path: root/perl-install/network/tools.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/network/tools.pm')
-rw-r--r--perl-install/network/tools.pm13
1 files changed, 10 insertions, 3 deletions
diff --git a/perl-install/network/tools.pm b/perl-install/network/tools.pm
index 62b9a0fb5..59bd397ca 100644
--- a/perl-install/network/tools.pm
+++ b/perl-install/network/tools.pm
@@ -9,7 +9,7 @@ use MDK::Common::Globals "network", qw($in $prefix $disconnect_file $connect_pro
use MDK::Common::System qw(getVarsFromSh);
@ISA = qw(Exporter);
-@EXPORT = qw(write_cnx_script write_secret_backend read_secret_backend passwd_by_login write_initscript ask_connect_now connect_backend disconnect_backend read_providers_backend ask_info2 type2interface connected connected_bg test_connected connected2 disconnected);
+@EXPORT = qw(ask_connect_now ask_info2 connect_backend connected connected2 connected_bg disconnect_backend disconnected is_wireless_intf passwd_by_login read_providers_backend read_secret_backend test_connected type2interface write_cnx_script write_initscript write_secret_backend);
@EXPORT_OK = qw($in);
sub write_cnx_script {
@@ -29,8 +29,10 @@ sub write_cnx_script {
sub write_secret_backend {
my ($a, $b) = @_;
- foreach my $i ("pap-secrets", "chap-secrets") {
- substInFile { s/^'$a'.*\n//; $_ .= "\n'$a' * '$b' * \n" if eof } "$prefix/etc/ppp/$i";
+ foreach my $i ("$prefix/etc/ppp/pap-secrets", "$prefix/etc/ppp/chap-secrets") {
+ substInFile { s/^'$a'.*\n//; $_ .= "\n'$a' * '$b' * \n" if eof } $i;
+ #- restore access right to secrets file, just in case.
+ chmod 0600, $i;
}
}
@@ -345,4 +347,9 @@ sub use_floppy {
}
+sub is_wireless_intf {
+ my ($module) = @_;
+ member($module, qw(airo aironet_cs aironet4500_cs airo_cs airport hermes orinoco_cs netwave_cs orinoco ray_cs wavelan_cs wvlan_cs))
+}
+
1;