summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugeni Dodonov <eugeni@mandriva.org>2009-04-02 14:55:51 +0000
committerEugeni Dodonov <eugeni@mandriva.org>2009-04-02 14:55:51 +0000
commitd6b4d26f44595acafa816f2661842f465efbd481 (patch)
tree2e79802f9330dfc27292d002ffc7a448c54e5f47
parentffea119edcca614529513901afe8d324469ff26b (diff)
downloaddrakx-net-d6b4d26f44595acafa816f2661842f465efbd481.tar
drakx-net-d6b4d26f44595acafa816f2661842f465efbd481.tar.gz
drakx-net-d6b4d26f44595acafa816f2661842f465efbd481.tar.bz2
drakx-net-d6b4d26f44595acafa816f2661842f465efbd481.tar.xz
drakx-net-d6b4d26f44595acafa816f2661842f465efbd481.zip
New way to disable ipv6 (#48618).
-rw-r--r--NEWS3
-rw-r--r--lib/network/network.pm14
2 files changed, 10 insertions, 7 deletions
diff --git a/NEWS b/NEWS
index d4c8ea3..fc0f767 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,6 @@
+- netcenter:
+ o new way of disabling IPv6 (#48618).
+
0.73:
- connection manager:
o check if the network is really working during the connection test
diff --git a/lib/network/network.pm b/lib/network/network.pm
index 63ab8bb..2009171 100644
--- a/lib/network/network.pm
+++ b/lib/network/network.pm
@@ -439,7 +439,7 @@ sub advanced_settings_read {
my $sysctl = "$::prefix/etc/sysctl.conf";
my $msecconf = "$::prefix/etc/security/msec/security.conf";
- my $ipv6_disabled = grep { /^install ipv6 \/bin\/true$/ } cat_($modprobe);
+ my $ipv6_disabled = grep { /^options ipv6 disable=1$/ } cat_($modprobe);
my $disable_window_scaling = grep { /^net\.ipv4\.tcp_window_scaling\s*=\s*0$/ } cat_($sysctl);
my $disable_tcp_timestamps = grep { /^net\.ipv4\.tcp_timestamps\s*=\s*0$/ } cat_($sysctl);
my $log_martians = grep { /^net\.ipv4\.conf\.all\.log_martians\s*=\s*1$/ } cat_($sysctl);
@@ -459,12 +459,12 @@ sub advanced_settings_read {
sub advanced_settings_write {
my ($u) = @_;
# ipv6
- if ($u->{ipv6_disabled}) {
- my $line = "install ipv6 /bin/true\n";
- substInFile { s/^install ipv6 .*//; $_ = $line if eof } "$::prefix/etc/modprobe.conf";
- } else {
- substInFile { s/^install ipv6 \/bin\/true// } "$::prefix/etc/modprobe.conf";
- }
+ substInFile {
+ /^(options ipv6 .*|install ipv6 .*|alias net-pf-10 off)/ and $_="";
+ if (eof and $u->{ipv6_disabled}) {
+ $_ .= "options ipv6 disable=1\n";
+ }
+ } "$::prefix/etc/modprobe.conf";
# sysctl
substInFile {
# remove old entries