Author: mzugec
Date: Tue Feb 9 14:35:15 2010
New Revision: 60762
URL: http://svn.opensuse.org/viewcvs/yast?rev=60762&view=rev
Log:
ipv6: enable/disable both module and sysctl method (bnc#561611)
Modified:
branches/SuSE-Code-11-SP1-Branch/network/VERSION
branches/SuSE-Code-11-SP1-Branch/network/package/yast2-network.changes
branches/SuSE-Code-11-SP1-Branch/network/src/modules/Lan.ycp
Modified: branches/SuSE-Code-11-SP1-Branch/network/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/network/VERSION?rev=60762&r1=60761&r2=60762&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/network/VERSION (original)
+++ branches/SuSE-Code-11-SP1-Branch/network/VERSION Tue Feb 9 14:35:15 2010
@@ -1 +1 @@
-2.17.119
+2.17.120
Modified: branches/SuSE-Code-11-SP1-Branch/network/package/yast2-network.changes
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/network/package/yast2-network.changes?rev=60762&r1=60761&r2=60762&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/network/package/yast2-network.changes (original)
+++ branches/SuSE-Code-11-SP1-Branch/network/package/yast2-network.changes Tue Feb 9 14:35:15 2010
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Tue Feb 9 14:31:42 CET 2010 - mzugec@suse.cz
+
+- ipv6: enable/disable both module and sysctl method (bnc#561611)
+- 2.17.120
+
+-------------------------------------------------------------------
Tue Feb 9 11:35:22 CET 2010 - kmachalkova@suse.cz
- Include in cloned data (bnc#576495)
Modified: branches/SuSE-Code-11-SP1-Branch/network/src/modules/Lan.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/network/src/modules/Lan.ycp?rev=60762&r1=60761&r2=60762&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP1-Branch/network/src/modules/Lan.ycp (original)
+++ branches/SuSE-Code-11-SP1-Branch/network/src/modules/Lan.ycp Tue Feb 9 14:35:15 2010
@@ -170,25 +170,37 @@
void readIPv6(){
ipv6=true;
- list<string> filelist = ["sysctl.conf"];
- string filepath = "/etc/";
- string regexp = "^[[:space:]]*(net.ipv6.conf.all.disable_ipv6)[[:space:]]*=[[:space:]]*1";
-// uncomment bellow to read from old place
-// filelist = ["ipv6", "50-ipv6.conf"];
-// filepath ="/etc/modprobe.d/";
-// regexp = "^[[:space:]]*(install ipv6 /bin/true)";
+ map > methods = $[
+ "builtin" : $[
+ "filelist" : ["sysctl.conf"],
+ "filepath" : "/etc/",
+ "regexp" : "^[[:space:]]*(net.ipv6.conf.all.disable_ipv6)[[:space:]]*=[[:space:]]*1"
+ ],
+ "module" : $[
+ "filelist" : ["ipv6", "50-ipv6.conf"],
+ "filepath" : "/etc/modprobe.d/",
+ "regexp" : "^[[:space:]]*(install ipv6 /bin/true)"
+ ]
+ ];
+
+ foreach(string which,map method, methods, {
+ list<string> filelist = method["filelist"]:[];
+ string filepath = method["filepath"]:"";
+ string regexp = method["regexp"]:"";
foreach(string file, filelist,{
string filename=sformat("%1/%2", filepath, file);
if (FileUtils::Exists(filename)){
foreach(string row, splitstring((string)SCR::Read(.target.string, filename), "\n"), {
if (size(regexptokenize(String::CutBlanks(row), regexp))>0){
- y2milestone("IPv6 is disabled.");
+ y2milestone("IPv6 is disabled by '%1' method.", which);
ipv6=false;
}
});
}
});
+ });
+
}
/**
@@ -362,7 +374,7 @@
void writeIPv6(){
// SCR::Write(.target.string, "/etc/modprobe.d/ipv6", sformat("%1install ipv6 /bin/true", ipv6?"#":""));
// uncomment to write to old place (and comment code bellow)
-// SCR::Write(.target.string, "/etc/modprobe.d/50-ipv6.conf", sformat("%1install ipv6 /bin/true", ipv6?"#":""));
+ SCR::Write(.target.string, "/etc/modprobe.d/50-ipv6.conf", sformat("%1install ipv6 /bin/true\n", ipv6?"#":""));
string filename = "/etc/sysctl.conf";
string sysctl = (string)SCR::Read(.target.string, filename);
string sysctl_row = sformat("%1net.ipv6.conf.all.disable_ipv6 = 1", ipv6?"# ":"");
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org