diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/udhcpc-script.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/udhcpc-script.c b/scripts/udhcpc-script.c index fb2168bc..e5ac3e90 100644 --- a/scripts/udhcpc-script.c +++ b/scripts/udhcpc-script.c @@ -51,10 +51,24 @@ int main(int argc, char *argv[]) interface = getenv("interface"); address = getenv("ip"); + if (address == NULL) + address = ""; + netmask = getenv("subnet"); + if (netmask == NULL) + netmask = ""; + broadcast = getenv("broadcast"); + if (broadcast == NULL) + broadcast = ""; + gateway = getenv("router"); + if (gateway == NULL) + gateway = ""; + dns = getenv("dns"); + if (dns == NULL) + dns = ""; dbus_error_init(&error); |