summaryrefslogtreecommitdiff
path: root/scripts/udhcpc-script.c
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/udhcpc-script.c')
-rw-r--r--scripts/udhcpc-script.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/scripts/udhcpc-script.c b/scripts/udhcpc-script.c
index a3f3b214..5d417b59 100644
--- a/scripts/udhcpc-script.c
+++ b/scripts/udhcpc-script.c
@@ -39,6 +39,7 @@ int main(int argc, char *argv[])
DBusMessage *msg;
char *busname, *interface, *address, *netmask, *broadcast;
char *gateway, *dns;
+ char *path;
if (argc < 2)
return 0;
@@ -50,6 +51,10 @@ int main(int argc, char *argv[])
interface = getenv("interface");
+ path = getenv("PATH");
+ if (path == NULL)
+ path = "";
+
address = getenv("ip");
if (address == NULL)
address = "";
@@ -82,8 +87,9 @@ int main(int argc, char *argv[])
return 0;
}
- msg = dbus_message_new_method_call(busname, UDHCPC_PATH,
- UDHCPC_INTF, argv[1]);
+ msg = dbus_message_new_method_call(busname, path,
+ "org.moblin.connman.Task",
+ "Notify");
if (msg == NULL) {
dbus_connection_unref(conn);
fprintf(stderr, "Failed to allocate method call\n");
@@ -98,6 +104,7 @@ int main(int argc, char *argv[])
DBUS_TYPE_STRING, &broadcast,
DBUS_TYPE_STRING, &gateway,
DBUS_TYPE_STRING, &dns,
+ DBUS_TYPE_STRING, &argv[1],
DBUS_TYPE_INVALID);
if (dbus_connection_send(conn, msg, NULL) == FALSE)