udhcpc: fix "udhcpc -x hostname:<name> not working on nommu"
authorDenys Vlasenko <vda.linux@googlemail.com>
Mon, 8 May 2017 13:02:07 +0000 (15:02 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Mon, 8 May 2017 13:02:07 +0000 (15:02 +0200)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
networking/udhcp/d6_dhcpc.c
networking/udhcp/dhcpc.c

index 3e087987679951968a3f0b9981201745aabc082b..9eddbe24c3773812523f06fdea64c8da3a179a0a 100644 (file)
@@ -1072,6 +1072,8 @@ int udhcpc6_main(int argc UNUSED_PARAM, char **argv)
                /* now it looks similar to udhcpd's config file line:
                 * "optname optval", using the common routine: */
                udhcp_str2optset(optstr, &client_config.options);
+               if (colon)
+                       *colon = ':'; /* restore it for NOMMU reexec */
        }
 
        if (d6_read_interface(client_config.interface,
index c45a0af1a28d0a2e38bc39724910c095d9e6e94c..1ccfff437b8e8c8b87a188ffaadc35ab355bf855 100644 (file)
@@ -1365,6 +1365,8 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
                /* now it looks similar to udhcpd's config file line:
                 * "optname optval", using the common routine: */
                udhcp_str2optset(optstr, &client_config.options);
+               if (colon)
+                       *colon = ':'; /* restore it for NOMMU reexec */
        }
 
        if (udhcp_read_interface(client_config.interface,