Hello community,
here is the log from the commit of package yast2-network
checked in at Thu Sep 20 23:04:23 CEST 2007.
--------
--- yast2-network/yast2-network.changes 2007-09-18 15:10:16.000000000 +0200
+++ /mounts/work_src_done/STABLE/yast2-network/yast2-network.changes 2007-09-20 18:49:42.055003000 +0200
@@ -1,0 +2,13 @@
+Thu Sep 20 18:40:22 CEST 2007 - kmachalkova@suse.cz
+
+- Always add '127.0.0.2 host.site host' line into /etc/hosts (if
+ 'Write hostname to /etc/hosts' is enabled) to make hostname
+ resolvable even without active network (#304632)
+- 2.15.78
+
+-------------------------------------------------------------------
+Thu Sep 20 16:59:25 CEST 2007 - mvidner@suse.cz
+
+- Escape quotes in NAME in save_network (#305343).
+
+-------------------------------------------------------------------
Old:
----
yast2-network-2.15.77.tar.bz2
New:
----
yast2-network-2.15.78.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-network.spec ++++++
--- /var/tmp/diff_new_pack.k22871/_old 2007-09-20 23:04:09.000000000 +0200
+++ /var/tmp/diff_new_pack.k22871/_new 2007-09-20 23:04:09.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-network (Version 2.15.77)
+# spec file for package yast2-network (Version 2.15.78)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -11,12 +11,12 @@
# norootforbuild
Name: yast2-network
-Version: 2.15.77
+Version: 2.15.78
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-network-2.15.77.tar.bz2
+Source0: yast2-network-2.15.78.tar.bz2
Prefix: /usr
# should be required by devtools
BuildRequires: perl-XML-Writer pkgconfig rpm
@@ -44,12 +44,12 @@
Summary: YaST2 - Network Configuration
%package devel-doc
-Version: 2.15.77
+Version: 2.15.78
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-network-2.15.77.tar.bz2
+Source0: yast2-network-2.15.78.tar.bz2
Prefix: /usr
Requires: yast2-network >= 2.15.53
Summary: YaST2 - Developer documentation for yast2-network
@@ -73,7 +73,7 @@
Michal Svec
%prep
-%setup -n yast2-network-2.15.77
+%setup -n yast2-network-2.15.78
%build
%{prefix}/bin/y2tool y2autoconf
@@ -138,8 +138,14 @@
%exclude %{prefix}/share/doc/packages/yast2-network/COPYING
%exclude %{prefix}/share/doc/packages/yast2-network/COPYRIGHT.english
%exclude %{prefix}/share/doc/packages/yast2-network/README
-
%changelog
+* Thu Sep 20 2007 - kmachalkova@suse.cz
+- Always add '127.0.0.2 host.site host' line into /etc/hosts (if
+ 'Write hostname to /etc/hosts' is enabled) to make hostname
+ resolvable even without active network (#304632)
+- 2.15.78
+* Thu Sep 20 2007 - mvidner@suse.cz
+- Escape quotes in NAME in save_network (#305343).
* Tue Sep 18 2007 - kmachalkova@suse.cz
- Removed all udev rules workarounds (manually removing lockfiles,
tmp rules, calling udevtrigger) - just copy udev rules for net and
++++++ yast2-network-2.15.77.tar.bz2 -> yast2-network-2.15.78.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-network-2.15.77/src/clients/save_network.ycp new/yast2-network-2.15.78/src/clients/save_network.ycp
--- old/yast2-network-2.15.77/src/clients/save_network.ycp 2007-09-18 15:09:14.000000000 +0200
+++ new/yast2-network-2.15.78/src/clients/save_network.ycp 2007-09-20 18:46:51.000000000 +0200
@@ -38,10 +38,16 @@
* @return true on success
*/
define boolean ReadInstallInfItem(path install_inf, string item, string var) {
- if(item == nil || item == "" || var == nil || var == "") return false;
+ if(item == nil || item == "" || var == nil || var == "")
+ return false;
+
string val = (string) SCR::Read(add(install_inf, var));
- if(val == nil) return false;
- if(val != "") InstallInf[item] = val;
+ if(val == nil)
+ return false;
+
+ if(val != "")
+ InstallInf[item] = val;
+
return true;
}
@@ -137,20 +143,21 @@
}
else
{
- // FIXME: alias = eth0 tulip
- // FIXME: options = ne io=0x200
+ // FIXME: alias = eth0 tulip
+ // FIXME: options = ne io=0x200
- // #42203: correctly parse module and options for proposal
- // "eth0 qeth" -> "qeth"
- // FIXME: this only works for a single module
- string mod = InstallInf["module"]:"";
- if (mod != "") {
- InstallInf["module"] = DeleteFirstWord (mod);
- }
- string options = InstallInf["options"]:"";
- if (options != "") {
- InstallInf["options"] = DeleteFirstWord (options);
- }
+ // #42203: correctly parse module and options for proposal
+ // "eth0 qeth" -> "qeth"
+ // FIXME: this only works for a single module
+ string mod = InstallInf["module"]:"";
+ if (mod != "") {
+ InstallInf["module"] = DeleteFirstWord (mod);
+ }
+
+ string options = InstallInf["options"]:"";
+ if (options != "") {
+ InstallInf["options"] = DeleteFirstWord (options);
+ }
}
y2milestone("InstallInf(%1)", InstallInf);
@@ -180,65 +187,85 @@
map hwcfg=$[];
void CreateIfcfg(){
- string network_configuration="";
- // set BOOTPROTO=[ static | dhcp ]
- if (InstallInf["bootproto"]:"dhcp"=="static") {
- // add broadcast interface #suse49131
- network_configuration=sformat("BOOTPROTO='static'\nIPADDR='%1/%2'\nBROADCAST='%3'\n",
- InstallInf["ipaddr"]:"", Netmask::ToBits(InstallInf["netmask"]:""), InstallInf["bcast"]:"");
- } else {
- network_configuration="BOOTPROTO='dhcp'\n";
- // set DHCP_SET_HOSTNAME=yes #suse30528
- y2milestone("set DHCLIENT_SET_HOSTNAME=yes on installed system");
- SCR::Execute(.target.bash_output, "sed -i s/\"DHCLIENT_SET_HOSTNAME=.*\"/'DHCLIENT_SET_HOSTNAME=\"yes\"'/g /etc/sysconfig/network/dhcp");
- }
+ string network_configuration="";
+ // set BOOTPROTO=[ static | dhcp ]
+ if (InstallInf["bootproto"]:"dhcp"=="static")
+ {
+ // add broadcast interface #suse49131
+ network_configuration=sformat("BOOTPROTO='static'\nIPADDR='%1/%2'\nBROADCAST='%3'\n",
+ InstallInf["ipaddr"]:"", Netmask::ToBits(InstallInf["netmask"]:""), InstallInf["bcast"]:"");
+ }
+ else
+ {
+ network_configuration="BOOTPROTO='dhcp'\n";
+ // set DHCP_SET_HOSTNAME=yes #suse30528
+ y2milestone("set DHCLIENT_SET_HOSTNAME=yes on installed system");
+ SCR::Execute(.target.bash_output, "sed -i s/\"DHCLIENT_SET_HOSTNAME=.*\"/'DHCLIENT_SET_HOSTNAME=\"yes\"'/g /etc/sysconfig/network/dhcp");
+ }
// wlan devices
- if (size(InstallInf["WESSID"]:"")>0 || size(InstallInf["WAuth"]:"")>0 || size(InstallInf["WKey"]:"")>0 || size(InstallInf["WKeyType"]:"")>0 || size(InstallInf["WKeyLen"]:"")>0){
- network_configuration = sformat("%1WIRELESS_ESSID='%2'\n", network_configuration, InstallInf["WESSID"]:"");
- network_configuration = sformat("%1WIRELESS_AUTH_MODE='%2'\n", network_configuration, InstallInf["WAuth"]:"");
- network_configuration = sformat("%1WIRELESS_AUTH_MODE='%2'\n", network_configuration, InstallInf["WAuth"]:"");
- network_configuration = sformat("%1WIRELESS_KEY_LENGTH='%2'\n", network_configuration, InstallInf["WKeyLen"]:"");
- if (size(InstallInf["WKeyType"]:"")>0 && size(InstallInf["WKey"]:"")>0)
- network_configuration = sformat("%1WIRELESS_KEY_0='%2:%3'\n", network_configuration, substring(InstallInf["WKeyType"]:"", 0, 1), InstallInf["WKey"]:"");
- }
+ if (size(InstallInf["WESSID"]:"")>0 || size(InstallInf["WAuth"]:"")>0 ||
+ size(InstallInf["WKey"]:"")>0 || size(InstallInf["WKeyType"]:"")>0 ||
+ size(InstallInf["WKeyLen"]:"")>0)
+ {
+ network_configuration = sformat("%1WIRELESS_ESSID='%2'\n", network_configuration, InstallInf["WESSID"]:"");
+ network_configuration = sformat("%1WIRELESS_AUTH_MODE='%2'\n", network_configuration, InstallInf["WAuth"]:"");
+ network_configuration = sformat("%1WIRELESS_AUTH_MODE='%2'\n", network_configuration, InstallInf["WAuth"]:"");
+ network_configuration = sformat("%1WIRELESS_KEY_LENGTH='%2'\n", network_configuration, InstallInf["WKeyLen"]:"");
+ if (size(InstallInf["WKeyType"]:"")>0 && size(InstallInf["WKey"]:"")>0)
+ network_configuration = sformat("%1WIRELESS_KEY_0='%2:%3'\n", network_configuration,
+ substring(InstallInf["WKeyType"]:"", 0, 1), InstallInf["WKey"]:"");
+ }
+
+
+ // if available, write MTU
+ if (size(InstallInf["mtu"]:"")>0)
+ network_configuration = sformat("%1MTU='%2'\n", network_configuration, InstallInf["mtu"]:"");
+
+ // for queth devices (s390)
+ if (size(InstallInf["LLADDR"]:"")>0)
+ network_configuration = sformat("%1LLADDR='%2'\n", network_configuration, InstallInf["LLADDR"]:"");
- // if available, write MTU
- if (size(InstallInf["mtu"]:"")>0) network_configuration = sformat("%1MTU='%2'\n", network_configuration, InstallInf["mtu"]:"");
+ if (network_disk)
+ {
+ network_configuration = sformat("%1STARTMODE='nfsroot'\n", network_configuration);
+ }
+ else
+ {
+ network_configuration = sformat("%1STARTMODE='onboot'\n", network_configuration);
+ }
- // for queth devices (s390)
- if (size(InstallInf["LLADDR"]:"")>0) network_configuration = sformat("%1LLADDR='%2'\n", network_configuration, InstallInf["LLADDR"]:"");
+ // reference to hardware configuration
+ // network_configuration = sformat("%1_nm_name='%2'\n", network_configuration, hwcfg);
+ // point to point interface
+ if (size(InstallInf["remote_ip"]:"")>0)
+ network_configuration = sformat("%1REMOTE_IPADDR='%2'\n", network_configuration, InstallInf["remote_ip"]:"");
- if (network_disk){ network_configuration = sformat("%1STARTMODE='nfsroot'\n", network_configuration);
- } else{network_configuration = sformat("%1STARTMODE='onboot'\n", network_configuration);
- }
+ list<map> hardware=ReadHardware("netcard");
+ y2milestone("hardware %1", hardware);
+
+ string ifcfg = sformat("ifcfg-%1", InstallInf["netdevice"]:"");
- // reference to hardware configuration
-// network_configuration = sformat("%1_nm_name='%2'\n", network_configuration, hwcfg);
+ string hw_name = BuildDescription(NetworkDevices::device_type(ifcfg), NetworkDevices::device_num(ifcfg), $["dev_name":InstallInf["netdevice"]:""], hardware);
+ // protect special characters, #305343
+ if (size(hw_name)>0)
+ network_configuration = sformat("%1NAME='%2'\n", network_configuration, String::Quote (hw_name));
- // point to point interface
- if (size(InstallInf["remote_ip"]:"")>0)network_configuration = sformat("%1REMOTE_IPADDR='%2'\n", network_configuration, InstallInf["remote_ip"]:"");
- list<map> hardware=ReadHardware("netcard");
-y2internal("hardware %1", hardware);
-
-string ifcfg = sformat("ifcfg-%1", InstallInf["netdevice"]:"");
-
- string hw_name = BuildDescription(NetworkDevices::device_type(ifcfg), NetworkDevices::device_num(ifcfg), $["dev_name":InstallInf["netdevice"]:""], hardware);
- if (size(hw_name)>0) network_configuration = sformat("%1NAME='%2'\n", network_configuration, hw_name);
-
-
- y2milestone("Network Configuration:\n%1\nifcfg file: %2", network_configuration, ifcfg);
-
- // write only if file doesn't exists
- string dev_file=sformat("/etc/sysconfig/network/%1", ifcfg);
-// string dev_file=sformat("/tmp/%1", ifcfg);
- if (!FileUtils::Exists(dev_file)) {
- SCR::Write(.target.string, dev_file, network_configuration);
- y2internal("ifcfg file: %1", dev_file);
- }
- else y2warning("File exists %1", dev_file);
+ y2milestone("Network Configuration:\n%1\nifcfg file: %2", network_configuration, ifcfg);
+
+ // write only if file doesn't exists
+ string dev_file=sformat("/etc/sysconfig/network/%1", ifcfg);
+ // string dev_file=sformat("/tmp/%1", ifcfg);
+
+ if (!FileUtils::Exists(dev_file))
+ {
+ SCR::Write(.target.string, dev_file, network_configuration);
+ y2milestone("ifcfg file: %1", dev_file);
+ }
+ else
+ y2warning("File exists %1", dev_file);
}
/*
@@ -248,53 +275,55 @@
void CreateOtherNetworkFiles(){
- // create hostname
- if (size(InstallInf["hostname"]:"")>0){
- y2milestone("Write HOSTANAME: %1", InstallInf["hostname"]:"");
- SCR::Write(.target.string, "/etc/HOSTNAME", InstallInf["hostname"]:"");
- }
-
- if(InstallInf["bootproto"]:"dhcp"=="static")
- {
- // create routes file
- if (size(InstallInf["gateway"]:"")>0){
- y2milestone("Writing route : %1", InstallInf["gateway"]:"");
- SCR::Write(.target.string, "/etc/sysconfig/network/routes", sformat("default %1 - -\n", InstallInf["gateway"]:""));
- } else y2warning("No routing information in install.inf");
-
- // create resolv.conf only for static configuration
- if (size(InstallInf["nameserver"]:"")>0){
- string text = "";
- //Enter search domain data only if present
- if( size(InstallInf["domain"]:"") > 0)
- text=sformat("search %1\nnameserver %2\n", InstallInf["domain"]:"", InstallInf["nameserver"]:"");
- else
- //If we don't have search domain data, skip 'search' field,
- //do not leave out 'nameserver' completely - #298001
- text = sformat("nameserver %1\n", InstallInf["nameserver"]:"");
- y2milestone("Write resolv.conf content: %1", text);
- SCR::Write(.target.string, "/etc/resolv.conf", text);
- }
- }
-
- // create proxy sysconfig file
- if (size(InstallInf["proxy"]:"")>0) {
- y2milestone("Writing proxy settings: %1", InstallInf["proxy"]:"");
- map ex = Proxy::Export();
- Proxy::Read();
- Proxy::Import( ex );
- Proxy::Write();
- }
- // create defaultdomain
- if (size(InstallInf["nisdomain"]:"")>0 && FileUtils::Exists("/etc/defaultdomain")){
- y2milestone("Write defaultdomain: %1", InstallInf["nisdomain"]:"");
- SCR::Write(.target.string, "/etc/defaultdomain", InstallInf["nisdomain"]:"");
- }
-
- // write wait_for_interfaces if needed
- if (size(InstallInf["connect_wait"]:"")>0){
- SCR::Execute(.target.bash_output, sformat("sed -i s/^WAIT_FOR_INTERFACES=.*/WAIT_FOR_INTERFACES=%1/g /etc/sysconfig/network/config", InstallInf["connect_wait"]:""));
- }
+ // create hostname
+ if (size(InstallInf["hostname"]:"")>0){
+ y2milestone("Write HOSTANAME: %1", InstallInf["hostname"]:"");
+ SCR::Write(.target.string, "/etc/HOSTNAME", InstallInf["hostname"]:"");
+ }
+
+ if(InstallInf["bootproto"]:"dhcp"=="static")
+ {
+ // create routes file
+ if (size(InstallInf["gateway"]:"")>0){
+ y2milestone("Writing route : %1", InstallInf["gateway"]:"");
+ SCR::Write(.target.string, "/etc/sysconfig/network/routes", sformat("default %1 - -\n", InstallInf["gateway"]:""));
+ }
+ else
+ y2warning("No routing information in install.inf");
+
+ // create resolv.conf only for static configuration
+ if (size(InstallInf["nameserver"]:"")>0){
+ string text = "";
+ //Enter search domain data only if present
+ if( size(InstallInf["domain"]:"") > 0)
+ text=sformat("search %1\nnameserver %2\n", InstallInf["domain"]:"", InstallInf["nameserver"]:"");
+ else
+ //If we don't have search domain data, skip 'search' field,
+ //do not leave out 'nameserver' completely - #298001
+ text = sformat("nameserver %1\n", InstallInf["nameserver"]:"");
+ y2milestone("Write resolv.conf content: %1", text);
+ SCR::Write(.target.string, "/etc/resolv.conf", text);
+ }
+ }
+
+ // create proxy sysconfig file
+ if (size(InstallInf["proxy"]:"")>0) {
+ y2milestone("Writing proxy settings: %1", InstallInf["proxy"]:"");
+ map ex = Proxy::Export();
+ Proxy::Read();
+ Proxy::Import( ex );
+ Proxy::Write();
+ }
+ // create defaultdomain
+ if (size(InstallInf["nisdomain"]:"")>0 && FileUtils::Exists("/etc/defaultdomain")){
+ y2milestone("Write defaultdomain: %1", InstallInf["nisdomain"]:"");
+ SCR::Write(.target.string, "/etc/defaultdomain", InstallInf["nisdomain"]:"");
+ }
+
+ // write wait_for_interfaces if needed
+ if (size(InstallInf["connect_wait"]:"")>0){
+ SCR::Execute(.target.bash_output, sformat("sed -i s/^WAIT_FOR_INTERFACES=.*/WAIT_FOR_INTERFACES=%1/g /etc/sysconfig/network/config", InstallInf["connect_wait"]:""));
+ }
}
/*
@@ -302,80 +331,81 @@
*/
void save_network(){
- // skip from chroot
- integer old_SCR = WFM::SCRGetDefault ();
- integer new_SCR = WFM::SCROpen ("chroot=/:scr", false);
- WFM::SCRSetDefault (new_SCR);
-
- // when root is on nfs/iscsi set startmode=nfsroot #176804
- string device = NetworkStorage::getDevice( Installation::destdir );
- y2internal("%1 directory is on %2 device", Installation::destdir, device);
- network_disk = NetworkStorage::isDiskOnNetwork( device );
-
- // --------------------------------------------------------------
- // Copy DHCP client cache so that we can request the same IP (#43974).
- WFM::Execute (.local.bash, sformat (
- "mkdir -p '%2%1'; /bin/cp -p %1/dhcpcd-*.cache '%2%1'",
- "/var/lib/dhcpcd",
- String::Quote (Installation::destdir)));
-
- //Deleting lockfiles and re-triggering udev events for *net is not needed any more
- //(#292375 c#18)
-
- string udev_rules_srcdir = "/etc/udev/rules.d";
- string net_srcfile = "70-persistent-net.rules";
- string cd_srcfile = "70-persistent-cd.rules";
-
- string udev_rules_destdir = sformat("%1%2", String::Quote (Installation::destdir), udev_rules_srcdir);
- string net_destfile = sformat("%1%2/%3", String::Quote (Installation::destdir), udev_rules_srcdir, net_srcfile);
- string cd_destfile = sformat("%1%2/%3", String::Quote (Installation::destdir), udev_rules_srcdir, cd_srcfile);
-
- //Do not create udev_rules_destdir if it already exists (in case of update)
- //(bug #293366, c#7)
-
- if (! FileUtils::Exists( udev_rules_destdir ))
- {
- y2milestone("%1 does not exist yet, creating it", udev_rules_destdir);
- WFM::Execute (.local.bash, sformat ("mkdir -p '%1'", udev_rules_destdir));
- }
-
- if (! FileUtils::Exists( net_destfile ))
- {
- y2milestone("Copying %1 to the installed system ", net_srcfile);
- WFM::Execute (.local.bash, sformat ("/bin/cp -p '%1/%2' '%3'", udev_rules_srcdir, net_srcfile, net_destfile));
- }
-
- if (! FileUtils::Exists( cd_destfile ))
- {
- y2milestone("Copying %1 to the installed system ", cd_srcfile);
- WFM::Execute (.local.bash, sformat ("/bin/cp -p '%1/%2' '%3'", udev_rules_srcdir, cd_srcfile, cd_destfile));
- }
-
- // close and chroot back
- WFM::SCRClose (new_SCR);
- WFM::SCRSetDefault (old_SCR);
-
- if (Mode::autoinst()){
- import "LanUdevAuto";
- LanUdevAuto::Write();
- }
-
-
- if(ReadInstallInf()){
-// string hwcfgname = CreateHardwareFile();
-// string ifcfg = sformat("ifcfg-%1", InstallInf["netdevice"]:"");
-
- CreateIfcfg();
- CreateOtherNetworkFiles();
-
- SCR::Execute(.target.bash, "chkconfig network on");
-
- // if portmap running - start it after reboot
- WFM::Execute (.local.bash,
- "pidofproc portmap && touch /var/lib/YaST2/network_install_portmap");
+ // skip from chroot
+ integer old_SCR = WFM::SCRGetDefault ();
+ integer new_SCR = WFM::SCROpen ("chroot=/:scr", false);
+ WFM::SCRSetDefault (new_SCR);
+
+ // when root is on nfs/iscsi set startmode=nfsroot #176804
+ string device = NetworkStorage::getDevice( Installation::destdir );
+ y2internal("%1 directory is on %2 device", Installation::destdir, device);
+ network_disk = NetworkStorage::isDiskOnNetwork( device );
+
+ // --------------------------------------------------------------
+ // Copy DHCP client cache so that we can request the same IP (#43974).
+ WFM::Execute (.local.bash, sformat (
+ "mkdir -p '%2%1'; /bin/cp -p %1/dhcpcd-*.cache '%2%1'",
+ "/var/lib/dhcpcd",
+ String::Quote (Installation::destdir)));
+
+ //Deleting lockfiles and re-triggering udev events for *net is not needed any more
+ //(#292375 c#18)
+
+ string udev_rules_srcdir = "/etc/udev/rules.d";
+ string net_srcfile = "70-persistent-net.rules";
+ string cd_srcfile = "70-persistent-cd.rules";
+
+ string udev_rules_destdir = sformat("%1%2", String::Quote (Installation::destdir), udev_rules_srcdir);
+ string net_destfile = sformat("%1%2/%3", String::Quote (Installation::destdir), udev_rules_srcdir, net_srcfile);
+ string cd_destfile = sformat("%1%2/%3", String::Quote (Installation::destdir), udev_rules_srcdir, cd_srcfile);
+ //Do not create udev_rules_destdir if it already exists (in case of update)
+ //(bug #293366, c#7)
+
+ if (! FileUtils::Exists( udev_rules_destdir ))
+ {
+ y2milestone("%1 does not exist yet, creating it", udev_rules_destdir);
+ WFM::Execute (.local.bash, sformat ("mkdir -p '%1'", udev_rules_destdir));
+ }
- } else
+ if (! FileUtils::Exists( net_destfile ))
+ {
+ y2milestone("Copying %1 to the installed system ", net_srcfile);
+ WFM::Execute (.local.bash, sformat ("/bin/cp -p '%1/%2' '%3'", udev_rules_srcdir, net_srcfile, net_destfile));
+ }
+
+ if (! FileUtils::Exists( cd_destfile ))
+ {
+ y2milestone("Copying %1 to the installed system ", cd_srcfile);
+ WFM::Execute (.local.bash, sformat ("/bin/cp -p '%1/%2' '%3'", udev_rules_srcdir, cd_srcfile, cd_destfile));
+ }
+
+ // close and chroot back
+ WFM::SCRClose (new_SCR);
+ WFM::SCRSetDefault (old_SCR);
+
+ if (Mode::autoinst()){
+ import "LanUdevAuto";
+ LanUdevAuto::Write();
+ }
+
+
+ if(ReadInstallInf()){
+ // string hwcfgname = CreateHardwareFile();
+ // string ifcfg = sformat("ifcfg-%1", InstallInf["netdevice"]:"");
+
+ CreateIfcfg();
+ CreateOtherNetworkFiles();
+
+ SCR::Execute(.target.bash, "chkconfig network on");
+
+ // if portmap running - start it after reboot
+ WFM::Execute (.local.bash,
+ "pidofproc portmap && touch /var/lib/YaST2/network_install_portmap");
+
+
+ }
+ else
y2error("Error while reading install.inf!");
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-network-2.15.77/src/modules/DNS.ycp new/yast2-network-2.15.78/src/modules/DNS.ycp
--- old/yast2-network-2.15.77/src/modules/DNS.ycp 2007-08-10 20:32:36.000000000 +0200
+++ new/yast2-network-2.15.78/src/modules/DNS.ycp 2007-09-20 18:40:03.000000000 +0200
@@ -4,7 +4,7 @@
* Summary: Hostname and DNS data
* Authors: Michal Svec
*
- * $Id: DNS.ycp 40215 2007-08-10 18:32:35Z kmachalkova $
+ * $Id: DNS.ycp 40999 2007-09-20 16:40:02Z kmachalkova $
*
* Manages resolv.conf and (fully qualified) hostname, also
* respecting DHCP.
@@ -228,27 +228,19 @@
/* build FQ hostname */
string fqhostname = Hostname::MergeFQ(hostname, domain);
- NetworkDevices::Read();
- // Take static network addresses.
- // Watch out, there may be an unused IPADDR for a DHCP interface, #49055
- list<string> devs =
- NetworkDevices::Locate ("BOOTPROTO", "static") +
- NetworkDevices::Locate ("BOOTPROTO", ""); // static is the default
- list<string> ips = maplist(string dev, devs, {
- return NetworkDevices::GetValue(dev, "IPADDR");
- });
- if (NetworkConfig::DHCP["WRITE_HOSTNAME_TO_HOSTS"]:true == false)
+ //We do not collect static IP addresses here, as hostnames
+ //are defined for each static IP separately in address dialog
+ //FaTE #2202
+
+ if (NetworkConfig::DHCP["WRITE_HOSTNAME_TO_HOSTS"]:true == false)
Host::write_hostname=false;
else
{
- /* Update /etc/hosts, but only iff there are no static
- IPs defined. Otherwise, hostnames are associated with
- static IPs in address dialog - FaTE #2202 */
- if ( ips == [] )
- {
- Host::Update(oldhostname, fqhostname, ips);
- Host::Write();
- }
+ //Always add 127.0.0.2 entry to /etc/hosts, otherwise some
+ //desktop apps may hang, not being able to resolve hostname (#304632)
+ //empty list [] as third parameter does that
+ Host::Update(oldhostname, fqhostname, []);
+ Host::Write();
}
oldhostname = fqhostname; // #49634
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-network-2.15.77/src/modules/Host.ycp new/yast2-network-2.15.78/src/modules/Host.ycp
--- old/yast2-network-2.15.77/src/modules/Host.ycp 2007-08-10 20:32:36.000000000 +0200
+++ new/yast2-network-2.15.78/src/modules/Host.ycp 2007-09-20 18:40:03.000000000 +0200
@@ -4,7 +4,7 @@
* Summary: Hosts data (/etc/hosts)
* Authors: Michal Svec
*
- * $Id: Host.ycp 40215 2007-08-10 18:32:35Z kmachalkova $
+ * $Id: Host.ycp 40999 2007-09-20 16:40:02Z kmachalkova $
*/
{
@@ -225,6 +225,18 @@
}
y2debug("Hosts: %1", hosts);
+ /* Add at least one hostname/ip */
+ // but do not overload localhost (#46715)
+ if (write_hostname) {
+ if (size(ips) < 1 && nick != "localhost") {
+ y2milestone("Adding dummy 127.0.0.2 %1 entry", newhn);
+ // TODO #42102
+ hosts["127.0.0.2"] = [ newhn + " " + nick ];
+ y2milestone("Hosts: %1", hosts);
+ return true;
+ }
+ }
+
/* Remove old hostname from hosts */
// list oldhnlist = [];
foreach (string ip, list<string> hs, hosts, {
@@ -248,17 +260,7 @@
hosts["127.0.0.1"] = ["localhost"];
}
- /* Add at least one hostname/ip */
- // but do not overload localhost (#46715)
- if (write_hostname)
- if (size(ips) < 1 && nick != "localhost") {
- y2milestone("No IP found, adding dummy 127.0.0.2");
- // TODO #42102
- hosts["127.0.0.2"] = [ newhn + " " + nick ];
- y2milestone("Hosts: %1", hosts);
- return true;
- }
-
+
/* Add hostname/ip for all ips */
boolean nickadded = false;
maplist(string ip, ips, {
@@ -266,7 +268,7 @@
/* Only add if not present yet */
// if(haskey(hosts, ip)) return;
/* Omit some IP addresses */
- if(ip == "" || ip == nil || ip == "127.0.0.1" || ip == "127.0.0.2") return;
+ if(ip == "" || ip == nil || ip == "127.0.0.1" ) return;
string name = newhn ;
/* Add nick for the first one */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-network-2.15.77/VERSION new/yast2-network-2.15.78/VERSION
--- old/yast2-network-2.15.77/VERSION 2007-09-18 14:57:35.000000000 +0200
+++ new/yast2-network-2.15.78/VERSION 2007-09-20 18:43:15.000000000 +0200
@@ -1 +1 @@
-2.15.77
+2.15.78
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org