Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian User (http://www.linux-archive.org/debian-user/)
-   -   Do not write out /etc/sysconfig/network in stage 1. (http://www.linux-archive.org/debian-user/515579-do-not-write-out-etc-sysconfig-network-stage-1-a.html)

Radek Vykydal 04-18-2011 12:10 PM

Do not write out /etc/sysconfig/network in stage 1.
 
These system-wide setting were writted per device ifcfg file,
which does not make sense (it kind of used to when we allowed
to activate only single device in stage1).
We will write its NETWORKING, IPV6_NETWORKING, GATEWAY, IPV6_DEFAULTGW,
HOSTNAME in stage2, or even let NM do the job (there is new method
SaveHostname in NM dbus API 9.0).
---
loader/net.c | 50 --------------------------------------------------
1 files changed, 0 insertions(+), 50 deletions(-)

diff --git a/loader/net.c b/loader/net.c
index 21c8b1e..ba74a46 100644
--- a/loader/net.c
+++ b/loader/net.c
@@ -1532,56 +1532,6 @@ int writeEnabledNetInfo(iface_t *iface) {
}


- /* Global settings */
- if ((fp = fopen(SYSCONFIG_PATH"/.network", "w")) == NULL) {
- return 9;
- }
-
- if (!FL_NOIPV4(flags)) {
- fprintf(fp, "NETWORKING=yes
");
- }
-
-#ifdef ENABLE_IPV6
- if (!FL_NOIPV6(flags)) {
- fprintf(fp, "NETWORKING_IPV6=yes
");
- }
-#endif
-
- if (iface->hostname != NULL) {
- fprintf(fp, "HOSTNAME=%s
", iface->hostname);
- }
-
- if (iface_have_in_addr(&iface->gateway)) {
- if (inet_ntop(AF_INET, &iface->gateway, buf,
- INET_ADDRSTRLEN) == NULL) {
- fclose(fp);
- return 10;
- }
-
- fprintf(fp, "GATEWAY=%s
", buf);
- }
-
-#ifdef ENABLE_IPV6
- if (iface_have_in6_addr(&iface->gateway6)) {
- if (inet_ntop(AF_INET6, &iface->gateway6, buf,
- INET6_ADDRSTRLEN) == NULL) {
- fclose(fp);
- return 11;
- }
-
- fprintf(fp, "IPV6_DEFAULTGW=%s
", buf);
- }
-#endif
-
- if (fclose(fp) == EOF) {
- return 12;
- }
-
- if (rename(SYSCONFIG_PATH"/.network",
- SYSCONFIG_PATH"/network") == -1) {
- return 15;
- }
-
return 0;
}

--
1.7.4

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


All times are GMT. The time now is 04:21 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.