Hello community,

here is the log from the commit of package linuxrc for openSUSE:Factory checked 
in at 2014-08-20 17:54:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/linuxrc (Old)
 and      /work/SRC/openSUSE:Factory/.linuxrc.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "linuxrc"

Changes:
--------
--- /work/SRC/openSUSE:Factory/linuxrc/linuxrc.changes  2014-08-13 
17:07:55.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.linuxrc.new/linuxrc.changes     2014-08-20 
17:54:24.000000000 +0200
@@ -1,0 +2,20 @@
+Mon Aug 18 16:25:48 CEST 2014 - [email protected]
+
+- s390x: don't resolve name of x11 server
+- fix nfs & cifs mounts (bnc #890172)
+- fix dialog window creation
+- 5.0.15
+
+-------------------------------------------------------------------
+Fri Aug 15 16:27:42 CEST 2014 - [email protected]
+
+- add vlan dialog
+- 5.0.14
+
+-------------------------------------------------------------------
+Thu Aug 14 12:47:06 CEST 2014 - [email protected]
+
+- add 'nanny' option to control wickedd-nanny; disable by default
+- 5.0.13
+
+-------------------------------------------------------------------

Old:
----
  linuxrc-5.0.12.tar.xz

New:
----
  linuxrc-5.0.15.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ linuxrc.spec ++++++
--- /var/tmp/diff_new_pack.gYz1hN/_old  2014-08-20 17:54:26.000000000 +0200
+++ /var/tmp/diff_new_pack.gYz1hN/_new  2014-08-20 17:54:26.000000000 +0200
@@ -25,9 +25,9 @@
 Summary:        SUSE Installation Program
 License:        GPL-3.0+
 Group:          System/Boot
-Version:        5.0.12
+Version:        5.0.15
 Release:        0
-Source:         linuxrc-5.0.12.tar.xz
+Source:         linuxrc-5.0.15.tar.xz
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
 %description

++++++ linuxrc-5.0.12.tar.xz -> linuxrc-5.0.15.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-5.0.12/VERSION new/linuxrc-5.0.15/VERSION
--- old/linuxrc-5.0.12/VERSION  2014-08-11 16:02:06.000000000 +0200
+++ new/linuxrc-5.0.15/VERSION  2014-08-18 16:25:37.000000000 +0200
@@ -1 +1 @@
-5.0.12
+5.0.15
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-5.0.12/changelog new/linuxrc-5.0.15/changelog
--- old/linuxrc-5.0.12/changelog        2014-08-11 16:02:12.000000000 +0200
+++ new/linuxrc-5.0.15/changelog        2014-08-18 16:25:43.000000000 +0200
@@ -1,4 +1,27 @@
-2014-08-11:    HEAD
+2014-08-18:    HEAD
+       - Merge pull request #24 from openSUSE/sw_0012
+       - Sw 0012
+       - clarify return code
+       - add comment
+       - s390x: don't resolve name of x11 server
+       - fix nfs & cifs mounts (bnc #890172)
+       - We don't do dns lookups in linuxrc any longer. Adjusted code to no 
longer
+       - rely on resolved addresses but to just use server names as provided 
by the
+       - user.
+       - fix dialog window creation
+       - Add a minimal width so dialog windows with input lines have at least 
the
+       - size of the input line.
+
+2014-08-15:    5.0.14
+       - Merge pull request #23 from openSUSE/sw_0011
+       - add vlan dialog
+       - fix net_input_vlanid()
+       - add vlan dialog
+
+2014-08-14:    5.0.13
+       - add 'nanny' option to control wickedd-nanny; disable by default
+
+2014-08-11:    5.0.12
        - Merge pull request #21 from openSUSE/sw_0009
        - netsetup=dhcp didn't work (bnc #890874, bnc #889887)
        - netsetup=dhcp didn't work (bnc #890874, bnc #889887)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-5.0.12/dialog.c new/linuxrc-5.0.15/dialog.c
--- old/linuxrc-5.0.12/dialog.c 2014-07-18 13:31:20.000000000 +0200
+++ new/linuxrc-5.0.15/dialog.c 2014-08-18 16:24:46.000000000 +0200
@@ -130,7 +130,7 @@
  */
 
 static int dia_binary(char *txt, char *button0, char *button1, int def);
-static int dia_win_open (window_t *win_prr, char *txt_tv);
+static int dia_win_open (window_t *win_prr, char *txt_tv, int min_width);
 static int lgetchar(void);
 static char *readline_input(char *prompt, char *val);
 
@@ -291,7 +291,7 @@
   memset(&win, 0, sizeof win);
   win.bg_color = colors_prg->choice_win;
   win.fg_color = colors_prg->choice_fg;
-  width = dia_win_open(&win, txt);
+  width = dia_win_open(&win, txt, 0);
 
   len0 = utf8_strwidth(button0_txt);
   len1 = utf8_strwidth(button1_txt);
@@ -352,7 +352,7 @@
         win_ri.bg_color = colors_prg->msg_win;
         win_ri.fg_color = colors_prg->msg_fg;
         }
-    width_ii = dia_win_open (&win_ri, txt_tv);
+    width_ii = dia_win_open (&win_ri, txt_tv, 0);
     s = msgtype_iv == MSGTYPE_REBOOT ? "Reboot" : "OK";
     util_generate_button (&button_ri, s, utf8_strwidth(s));
     win_add_button (&win_ri, &button_ri,
@@ -988,7 +988,7 @@
     memset(&win_ri, 0, sizeof (window_t));
     win_ri.bg_color = colors_prg->input_win;
     win_ri.fg_color = colors_prg->msg_fg;
-    dia_win_open(&win_ri, txt_tv);
+    dia_win_open(&win_ri, txt_tv, fieldlen_iv);
 
     memset(&tmp_win_ri, 0, sizeof (window_t));
     tmp_win_ri.x_left = win_ri.x_left + 1;
@@ -1370,7 +1370,7 @@
  *
  */
 
-static int dia_win_open (window_t *win_prr, char *txt_tv)
+static int dia_win_open (window_t *win_prr, char *txt_tv, int min_width)
     {
     int        width_ii;
     window_t   tmp_win_ri;
@@ -1379,7 +1379,10 @@
     int        i_ii;
 
 
-    width_ii = utf8_strwidth (txt_tv) + 6;
+    width_ii = utf8_strwidth (txt_tv);
+    if(min_width > width_ii) width_ii = min_width;
+    width_ii += 6;
+
     if (width_ii < MIN_WIN_SIZE)
         width_ii = MIN_WIN_SIZE;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-5.0.12/file.c new/linuxrc-5.0.15/file.c
--- old/linuxrc-5.0.12/file.c   2014-08-11 16:01:59.000000000 +0200
+++ new/linuxrc-5.0.15/file.c   2014-08-18 16:24:46.000000000 +0200
@@ -59,9 +59,6 @@
 static void file_dump_mlist(module_t *ml);
 #endif
 
-static void file_write_inet2(FILE *f, file_key_t key, inet_t *inet, unsigned 
what);
-static void file_write_inet2_str(FILE *f, char *name, inet_t *inet, unsigned 
what);
-
 static void add_driver(char *str);
 static void parse_ethtool(slist_t *sl, char *str);
 static void wait_for_conn(int port);
@@ -306,6 +303,8 @@
   { key_ifcfg,          "ifcfg",          kf_cfg + kf_cmd_early          },
   { key_defaultinstall, "DefaultInstall", kf_cfg + kf_cmd                },
   { key_defaultinstall, "DefaultRepo",    kf_cfg + kf_cmd                },
+  { key_nanny,          "nanny",          kf_cfg + kf_cmd_early          },
+  { key_vlanid,         "VLanID",         kf_cfg + kf_cmd                },
 };
 
 static struct {
@@ -869,8 +868,7 @@
         break;
 
       case key_displayip:
-        name2inet(&config.net.displayip, f->value);
-        net_check_address(&config.net.displayip, 0);
+        str_copy(&config.net.displayip, *f->value ? f->value : NULL);
         break;
                                       
       case key_sshpassword:
@@ -1118,7 +1116,7 @@
             i = 0;
             if(!strcmp(s, "dhcp")) i = NS_DHCP;
             else if(!strcmp(s, "hostip")) i = NS_HOSTIP;
-            else if(!strcmp(s, "netmask")) i = NS_NETMASK;
+            else if(!strcmp(s, "vlanid")) i = NS_VLANID;
             else if(!strcmp(s, "gateway")) i = NS_GATEWAY;
 #if defined(__s390__) || defined(__s390x__)
             else if(!strcmp(s, "display")) i = NS_DISPLAY;
@@ -1341,7 +1339,7 @@
         if(f->is.numeric) config.withiscsi = f->nvalue;
         if(config.withiscsi && !config.net.do_setup) {
           config.net.do_setup |= DS_SETUP;
-          config.net.setup = NS_DEFAULT;
+          config.net.setup |= NS_DEFAULT;
         }
         break;
 
@@ -1675,6 +1673,24 @@
         if(*f->value) config.defaultrepo = slist_split(',', f->value);
         break;
 
+      case key_nanny:
+        if(f->is.numeric) config.nanny = f->nvalue;
+        break;
+
+      case key_vlanid:
+        if(f->is.numeric) {
+          // set vlan id if it's a positive integer...
+          if(f->nvalue > 0) {
+            strprintf(&config.ifcfg.manual->vlan, "%d", f->nvalue);
+          }
+          config.net.setup |= NS_VLANID;
+        }
+        else {
+          // ... else clear setting
+          str_copy(&config.ifcfg.manual->vlan, NULL);
+        }
+        break;
+
       default:
         break;
     }
@@ -1759,44 +1775,6 @@
 }
 
 
-void file_write_inet2(FILE *f, file_key_t key, inet_t *inet, unsigned what)
-{
-  file_write_inet2_str(f, file_key2str(key), inet, what);
-}
-
-
-void file_write_inet2_str(FILE *f, char *name, inet_t *inet, unsigned what)
-{
-  const char *ip = NULL;
-  char buf[INET6_ADDRSTRLEN];
-  char prefix4[64], prefix6[64];
-
-  *prefix4 = *prefix6 = 0;
-  if(inet->prefix4 && (what & INET_WRITE_PREFIX)) sprintf(prefix4, "/%u", 
inet->prefix4);
-  if(inet->prefix6 && (what & INET_WRITE_PREFIX)) sprintf(prefix6, "/%u", 
inet->prefix6);
-
-  if((what & INET_WRITE_NAME_OR_IP)) {
-    if(inet->name && *inet->name) ip = inet->name;
-  }
-
-  if(!ip) {
-    if(inet->ok && inet->ipv6 && config.net.ipv6) {
-      ip = inet_ntop(AF_INET6, &inet->ip6, buf, sizeof buf);
-      if(ip && (what & INET_WRITE_IP_BOTH)) {
-        fprintf(f, "%s6: %s%s\n", name, ip, prefix6);
-        ip = NULL;
-      }
-    }
-  }
-
-  if(!ip && inet->ok && inet->ipv4 && config.net.ipv4) {
-    ip = inet_ntop(AF_INET, &inet->ip, buf, sizeof buf);
-  }
-
-  if(ip) fprintf(f, "%s: %s\n", name, ip);
-}
-
-
 void file_write_install_inf(char *dir)
 {
   FILE *f;
@@ -1851,7 +1829,7 @@
   file_write_num(f, key_memfree, config.memoryXXX.current >> 10);      // 
convention: in kB
   file_write_num(f, key_vnc, config.vnc);
   file_write_str(f, key_vncpassword, config.net.vncpassword);
-  file_write_inet2(f, key_displayip, &config.net.displayip, INET_WRITE_IP);
+  file_write_str(f, key_displayip, config.net.displayip);
   file_write_num(f, key_usessh, config.usessh & ~config.sshd_only);
   file_write_num(f, key_sshd, config.usessh);
   if(config.noshell) file_write_num(f, key_noshell, config.noshell);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-5.0.12/file.h new/linuxrc-5.0.15/file.h
--- old/linuxrc-5.0.12/file.h   2014-08-06 16:18:39.000000000 +0200
+++ new/linuxrc-5.0.15/file.h   2014-08-18 15:17:24.000000000 +0200
@@ -53,7 +53,7 @@
   key_osahwaddr, key_zen, key_zenconfig, key_udevrule, key_dhcpfail,
   key_namescheme, key_ptoptions, key_is_ptoption, key_withfcoe, key_digests,
   key_plymouth, key_sslcerts, key_restart, key_restarted, key_autoyast2,
-  key_withipoib, key_upgrade, key_ifcfg, key_defaultinstall
+  key_withipoib, key_upgrade, key_ifcfg, key_defaultinstall, key_nanny, 
key_vlanid
 } file_key_t;
 
 typedef enum {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-5.0.12/global.h new/linuxrc-5.0.15/global.h
--- old/linuxrc-5.0.12/global.h 2014-08-08 11:15:01.000000000 +0200
+++ new/linuxrc-5.0.15/global.h 2014-08-18 16:24:46.000000000 +0200
@@ -265,7 +265,6 @@
     char *hwaddr;
     char *model;
     char *unique_id;
-    inet_t server;
   } used;
 } url_t;
 
@@ -304,17 +303,16 @@
 /* reserved                    (1 << 0) */
 #define NS_DHCP                        (1 << 1)
 #define NS_HOSTIP              (1 << 2)
-#define NS_NETMASK             (1 << 3)
+#define NS_VLANID              (1 << 3)
 #define NS_GATEWAY             (1 << 4)
 #define NS_NAMESERVER          (1 << 5)
 #define NS_DISPLAY             (1 << 7)
-// #define NS_DHCP6            (1 << 8)
 #define NS_NOW                 (1 << 9)
 
 #if defined(__s390__) || defined(__s390x__)
-#define NS_DEFAULT             (NS_DHCP | NS_HOSTIP | NS_NETMASK | NS_GATEWAY 
| NS_NAMESERVER | NS_DISPLAY)
+#define NS_DEFAULT             (NS_DHCP | NS_HOSTIP | NS_GATEWAY | 
NS_NAMESERVER | NS_DISPLAY)
 #else
-#define NS_DEFAULT             (NS_DHCP | NS_HOSTIP | NS_NETMASK | NS_GATEWAY 
| NS_NAMESERVER)
+#define NS_DEFAULT             (NS_DHCP | NS_HOSTIP | NS_GATEWAY | 
NS_NAMESERVER)
 #endif
 
 #define SPLASH_10      NULL
@@ -399,6 +397,7 @@
   unsigned restarting:1;       /* we are preparing for restart */
   unsigned restarted:1;                /* we have been restarted */
   unsigned wicked:1;           /* use wicked for network setup */
+  unsigned nanny:1;            /* use wickedd-nanny */
   unsigned upgrade:1;          /* upgrade or fresh install */
   struct {
     unsigned check:1;          /* check for braille displays and start brld if 
found */
@@ -610,7 +609,7 @@
     char *share;               /* SMB */
     char *user;                        /* if this is NULL, perform guest login 
*/
     char *vncpassword;
-    inet_t displayip;          /* IP of remote X server */
+    char *displayip;           /* name of remote X server */
     char *sshpassword;         /* inst-sys root password */
     char *sshpassword_enc;     /* encrypted inst-sys root password */
     net_config_t configured;   /* how we configured the network device */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-5.0.12/install.c new/linuxrc-5.0.15/install.c
--- old/linuxrc-5.0.12/install.c        2014-08-04 12:09:57.000000000 +0200
+++ new/linuxrc-5.0.15/install.c        2014-08-18 16:24:46.000000000 +0200
@@ -264,7 +264,7 @@
 #if defined(__s390__) || defined(__s390x__)  
 int inst_choose_display()
 {
-  if(!config.manual && (config.net.displayip.ok || config.vnc || 
config.usessh)) {
+  if(!config.manual && (config.net.displayip || config.vnc || config.usessh)) {
     net_ask_password();
     return 0;
   }
@@ -297,7 +297,7 @@
 
   switch(di) {
     case di_display_x11:
-      if(net_get_address("Enter the IP address of the host running the X11 
server.", &config.net.displayip, 1)) return -1;
+      if(dia_input2("Enter the name of the host running the X11 server.", 
&config.net.displayip, 40)) return -1;
       break;
 
     case di_display_vnc:
@@ -746,7 +746,7 @@
   }
 
   /* server name */
-  strprintf(&buf, "Enter the IP address of the %s server.", 
get_instmode_name_up(scheme));
+  strprintf(&buf, "Enter the name of the %s server.", 
get_instmode_name_up(scheme));
   if(net_get_address2(buf, &server, 1, &n_user, &n_password, &n_port)) err = 1;
   if(!err && n_port) port = n_port;
 
@@ -831,7 +831,7 @@
     }
     else if(i == YES) {
       /* new proxy */
-      strprintf(&buf, "Enter the address of the %s proxy.", 
get_instmode_name_up(inst_http));
+      strprintf(&buf, "Enter the name of the %s proxy.", 
get_instmode_name_up(inst_http));
       if(net_get_address2(buf, &proxy, 1, &n_user, &n_password, &n_port)) err 
= 1;
 
       if(!err) {
@@ -916,7 +916,6 @@
     }
     config.url.install = url_set(buf);
 
-    memcpy(&config.url.install->used.server, &server, sizeof 
config.url.install->used.server);
     memset(&server, 0, sizeof server);
 
     config.url.install->port = port;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-5.0.12/linuxrc.c new/linuxrc-5.0.15/linuxrc.c
--- old/linuxrc-5.0.12/linuxrc.c        2014-08-11 16:01:59.000000000 +0200
+++ new/linuxrc-5.0.15/linuxrc.c        2014-08-18 15:17:24.000000000 +0200
@@ -805,6 +805,8 @@
   config.ifcfg.manual = calloc(1, sizeof *config.ifcfg.manual);
   config.ifcfg.manual->dhcp = 1;
 
+  config.nanny = 0;    // disable for now
+
   #if defined(__s390__) || defined(__s390x__)
   config.linemode = 1;
   #endif
@@ -939,6 +941,9 @@
     }
   }
 
+  // prepare wicked for nanny
+  net_nanny();
+
   // set up config key list
   net_wicked_get_config_keys();
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-5.0.12/net.c new/linuxrc-5.0.15/net.c
--- old/linuxrc-5.0.12/net.c    2014-08-11 16:01:59.000000000 +0200
+++ new/linuxrc-5.0.15/net.c    2014-08-18 16:24:46.000000000 +0200
@@ -55,6 +55,7 @@
 
 static int net_choose_device(void);
 static int net_input_data(void);
+static int net_input_vlanid(void);
 
 static int wlan_auth_cb(dia_item_t di);
 
@@ -120,7 +121,7 @@
   char buf[256];
 
   // in manual mode, ask for everything
-  if(config.manual) config.net.setup = NS_DEFAULT;
+  if(config.manual) config.net.setup |= NS_DEFAULT;
 
   // FIXME: not really here
   net_ask_password();
@@ -139,6 +140,11 @@
 
   config.net.configured = nc_none;
 
+  if(config.win) {
+    rc = net_input_vlanid();
+    if(rc) return -1;
+  }
+
   if(config.win && config.net.setup != NS_DHCP) {
     if(
       config.net.setup & NS_DHCP &&
@@ -451,13 +457,13 @@
  *   options += ",ip=" + SERVER_IP          falls SERVER_IP gesetzt ist
  * "  mount -t smbfs" + device + " " + mountpoint + " " + options
  */
-int net_mount_cifs(char *mountpoint, inet_t *server, char *share, char *user, 
char *password, char *workgroup, char *options)
+int net_mount_cifs(char *mountpoint, char *server, char *share, char *user, 
char *password, char *workgroup, char *options)
 {
   char *cmd = NULL;
   char *real_options = NULL;
   int err;
 
-  if(!config.net.cifs.binary || !server->name) return -2;
+  if(!config.net.cifs.binary || !server) return -EDESTADDRREQ; // -89
 
   mod_modprobe(config.net.cifs.module, NULL);
 
@@ -475,7 +481,7 @@
     }
   }
 
-  strprintf(&cmd, "%s '//%s/%s' '%s' -o '%s' >&2", config.net.cifs.binary, 
server->name, share, mountpoint, real_options);
+  strprintf(&cmd, "%s '//%s/%s' '%s' -o '%s' >&2", config.net.cifs.binary, 
server, share, mountpoint, real_options);
 
   fprintf(stderr, "%s\n", cmd);
 
@@ -492,7 +498,7 @@
  * Mount NFS volume.
  *
  * mountpoint: mount point
- * server: server address
+ * server: NFS server name
  * hostdir: directory on server
  * options: NFS mount options
  *
@@ -505,13 +511,13 @@
  *   != 0: error code
  *
  */
-int net_mount_nfs(char *mountpoint, inet_t *server, char *hostdir, unsigned 
port, char *options)
+int net_mount_nfs(char *mountpoint, char *server, char *hostdir, unsigned 
port, char *options)
 {
   char *path = NULL;
   char *real_options = NULL;
   pid_t mount_pid;
 
-  if(!server->name) return -2;
+  if(!server) return -EDESTADDRREQ;    // -89
 
   if(!hostdir) hostdir = "/";
   if(!mountpoint || !*mountpoint) mountpoint = "/";
@@ -530,11 +536,11 @@
     return WEXITSTATUS(err);
   }
 
-  if(strchr(server->name, ':')) {
-    strprintf(&path, "[%s]:%s", server->name, hostdir);
+  if(strchr(server, ':')) {
+    strprintf(&path, "[%s]:%s", server, hostdir);
   }
   else {
-    strprintf(&path, "%s:%s", server->name, hostdir);
+    strprintf(&path, "%s:%s", server, hostdir);
   }
 
   str_copy(&real_options, "nolock");
@@ -873,6 +879,42 @@
 
 
 /*
+ * Ask for vlan id and store in config.ifcfg.manual.
+ */
+int net_input_vlanid()
+{
+  int err = 0, id;
+
+  char *buf = NULL, *s;
+
+  if(!(config.net.setup & NS_VLANID)) return 0;
+
+  str_copy(&buf, config.ifcfg.manual->vlan);
+
+  do {
+    err = 0;
+
+    if(dia_input2("Enter your VLAN ID\n\nLeave empty if you don't setup a 
VLAN.", &buf, 30, 0)) {
+      err = 1;
+      break;
+    }
+
+    if(!buf) break;
+
+    id = strtoul(buf, &s, 0);
+    if(*s || id <= 0) err = 1;
+    if(err) dia_message("Invalid input.", MSGTYPE_ERROR);
+  } while(err);
+
+  if(!err) str_copy(&config.ifcfg.manual->vlan, buf);
+
+  str_copy(&buf, NULL);
+
+  return err;
+}
+
+
+/*
  * Ask user for a space-separated list of network addresses.
  *
  * If with_prefix is set, it must include the '/prefix' notation.
@@ -2649,6 +2691,14 @@
 }
 
 
+/*
+ * Check if buf is a valid ip address.
+ *
+ * If with_prefix is set, require '/prefix_bits' appended.
+ * If multi is set, buf may be a space-separated list of ip addresses.
+ *
+ * Returns 1 for ok and 0 for not ok.
+ */
 int net_check_ip(char *buf, int multi, int with_prefix)
 {
   int ok = 1;
@@ -2739,3 +2789,38 @@
   file_free_file(f0);
 }
 
+
+/*
+ * Enable/disable wickedd-nanny according to config.nanny.
+ */
+void net_nanny()
+{
+  FILE *fp, *fp2;
+
+  if((fp = fopen("/etc/wicked/common.xml", "r"))) {
+    char buf[4096];
+
+    // we allow open to fail and check fp2 for NULL later
+    fp2 = fopen("/etc/wicked/common.xml.tmp", "w");
+
+    while(fgets(buf, sizeof buf, fp)) {
+      if(strstr(buf, "<use-nanny>") && strstr(buf, "</use-nanny>")) {
+        if(config.debug) fprintf(stderr, "wickedd-nanny: %s\n", config.nanny ? 
"enabled" : "disabled");
+        if(fp2) fprintf(fp2, "  <use-nanny>%s</use-nanny>\n", config.nanny ? 
"true" : "false");
+        *buf = 0;
+      }
+      if(*buf && fp2) fputs(buf, fp2);
+    }
+
+    fclose(fp);
+
+    if(fp2) {
+      fclose(fp2);
+      rename("/etc/wicked/common.xml.tmp", "/etc/wicked/common.xml");
+    }
+    else {
+      fprintf(stderr, "warning: /etc/wicked/common.xml not updated\n");
+    }
+  }
+}
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-5.0.12/net.h new/linuxrc-5.0.15/net.h
--- old/linuxrc-5.0.12/net.h    2014-08-08 11:15:01.000000000 +0200
+++ new/linuxrc-5.0.15/net.h    2014-08-18 16:24:46.000000000 +0200
@@ -9,8 +9,8 @@
 int net_config(void);
 int net_config2(int type);
 void net_ask_password(void);
-int net_mount_nfs(char *mountpoint, inet_t *server, char *hostdir, unsigned 
port, char *options);
-int net_mount_cifs(char *mountpoint, inet_t *server, char *hostdir, char 
*user, char *password, char *workgroup, char *options);
+int net_mount_nfs(char *mountpoint, char *server, char *hostdir, unsigned 
port, char *options);
+int net_mount_cifs(char *mountpoint, char *server, char *hostdir, char *user, 
char *password, char *workgroup, char *options);
 void net_stop(void);
 int net_check_address(inet_t *inet, int do_dns);
 int net_static(void);
@@ -33,3 +33,4 @@
 int net_config_needed(int really);
 unsigned check_ptp(char *ifname);
 void net_wicked_get_config_keys(void);
+void net_nanny(void);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/linuxrc-5.0.12/url.c new/linuxrc-5.0.15/url.c
--- old/linuxrc-5.0.12/url.c    2014-08-04 12:09:57.000000000 +0200
+++ new/linuxrc-5.0.15/url.c    2014-08-18 16:24:46.000000000 +0200
@@ -118,7 +118,6 @@
   str_copy(&proxy_url, url_print(config.url.proxy, 1));
   if(proxy_url) {
     if(config.debug >= 2) fprintf(stderr, "using proxy %s\n", proxy_url);
-    name2inet(&config.url.proxy->used.server, config.url.proxy->server);
     curl_easy_setopt(c_handle, CURLOPT_PROXY, proxy_url);
     if(config.debug >= 2) fprintf(stderr, "proxy: %s\n", proxy_url);
   }
@@ -881,7 +880,6 @@
     free(url->used.hwaddr);
     free(url->used.model);
     free(url->used.unique_id);
-    free(url->used.server.name);
 
     slist_free(url->query);
     slist_free(url->file_list);
@@ -1179,10 +1177,10 @@
       case inst_nfs:
         str_copy(&url->mount, dir ?: new_mountpoint());
 
-        if(config.debug) fprintf(stderr, "[server = %s]\n", 
inet2print(&url->used.server));
+        if(config.debug) fprintf(stderr, "[server = %s]\n", url->server ?: "");
 
         if(!url->is.file) {
-          err = net_mount_nfs(url->mount, &url->used.server, url->path, 
url->port, options);
+          err = net_mount_nfs(url->mount, url->server, url->path, url->port, 
options);
           fprintf(stderr, "nfs: %s -> %s (%d)\n", url->path, url->mount, err);
         }
         else {
@@ -1197,9 +1195,9 @@
             *s++ = 0;
             str_copy(&url->tmp_mount, new_mountpoint());
 
-            if(config.debug) fprintf(stderr, "[server = %s]\n", 
inet2print(&url->used.server));
+            if(config.debug) fprintf(stderr, "[server = %s]\n", url->server ?: 
"");
 
-            err = net_mount_nfs(url->tmp_mount, &url->used.server, buf, 
url->port, options);
+            err = net_mount_nfs(url->tmp_mount, url->server, buf, url->port, 
options);
             fprintf(stderr, "nfs: %s -> %s (%d)\n", buf, url->tmp_mount, err);
     
             if(err) {
@@ -1228,9 +1226,9 @@
           s = url->mount;
         }
 
-        if(config.debug) fprintf(stderr, "[server = %s]\n", 
inet2print(&url->used.server));
+        if(config.debug) fprintf(stderr, "[server = %s]\n", url->server ?: "");
 
-        err = net_mount_cifs(s, &url->used.server, url->share, url->user, 
url->password, url->domain, options);
+        err = net_mount_cifs(s, url->server, url->share, url->user, 
url->password, url->domain, options);
         fprintf(stderr, "cifs: %s -> %s (%d)\n", url->share, s, err);
         if(err) {
           str_copy(&url->tmp_mount, NULL);
@@ -2258,7 +2256,6 @@
   else {
     ok = url_setup_interface(url);
     if(ok) {
-      name2inet(&url->used.server, url->server);
       net_ask_password();      // FIXME: strange location to put it here...
       ok = url_setup_slp(url);
     }

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to