Commit de2e0e55 authored by Dan Williams's avatar Dan Williams
Browse files

2005-05-15 Dan Williams <dcbw@redhat.com>

	* configure.in
		- Check for dhcdbd and error if its not found

	* src/dhcp-manager/Makefile.am
	  src/dhcp-manager/nm-dhcp-manager.c
		- Use path to dhcdbd that configure found


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@630 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
parent 16ef5809
2005-05-15 Dan Williams <dcbw@redhat.com>
* configure.in
- Check for dhcdbd and error if its not found
* src/dhcp-manager/Makefile.am
src/dhcp-manager/nm-dhcp-manager.c
- Use path to dhcdbd that configure found
2005-05-14 Dan Williams <dcbw@redhat.com> 2005-05-14 Dan Williams <dcbw@redhat.com>
* gnome/applet/nm-device.c * gnome/applet/nm-device.c
......
...@@ -193,6 +193,12 @@ AC_DEFINE_UNQUOTED(NM_NAMED_BINARY_PATH, "$with_named", [Define to path of named ...@@ -193,6 +193,12 @@ AC_DEFINE_UNQUOTED(NM_NAMED_BINARY_PATH, "$with_named", [Define to path of named
AC_DEFINE_UNQUOTED(NM_NAMED_DATA_DIR, "$with_named_dir", [Define to path of named data directory]) AC_DEFINE_UNQUOTED(NM_NAMED_DATA_DIR, "$with_named_dir", [Define to path of named data directory])
AC_DEFINE_UNQUOTED(NM_NAMED_USER, "$with_named_user", [Define to named username]) AC_DEFINE_UNQUOTED(NM_NAMED_USER, "$with_named_user", [Define to named username])
AC_PATH_PROG(DHCDBD_BINARY_PATH, dhcdbd)
if ! test -x "$DHCDBD_BINARY_PATH"; then
AC_MSG_ERROR(dhcdbd was not installed. See http://people.redhat.com/jvdias/dhcdbd)
fi
AC_SUBST(DHCDBD_BINARY_PATH)
#### find the actual value for $prefix that we'll end up with #### find the actual value for $prefix that we'll end up with
## (I know this is broken and should be done in the Makefile, but ## (I know this is broken and should be done in the Makefile, but
## that's a major pain and almost nobody actually seems to care) ## that's a major pain and almost nobody actually seems to care)
......
...@@ -8,6 +8,7 @@ libdhcp_manager_la_SOURCES = nm-dhcp-manager.c \ ...@@ -8,6 +8,7 @@ libdhcp_manager_la_SOURCES = nm-dhcp-manager.c \
libdhcp_manager_la_CPPFLAGS = $(DBUS_CFLAGS) \ libdhcp_manager_la_CPPFLAGS = $(DBUS_CFLAGS) \
$(GTHREAD_CFLAGS) \ $(GTHREAD_CFLAGS) \
$(HAL_CFLAGS) \ $(HAL_CFLAGS) \
-DDHCDBD_BINARY_PATH=\"$(DHCDBD_BINARY_PATH)\" \
-g \ -g \
-Wall \ -Wall \
-DDBUS_API_SUBJECT_TO_CHANGE \ -DDBUS_API_SUBJECT_TO_CHANGE \
......
...@@ -31,8 +31,6 @@ ...@@ -31,8 +31,6 @@
#include <arpa/inet.h> #include <arpa/inet.h>
#define DHCP_DAEMON_PROGRAM "/sbin/dhcdbd"
struct NMDHCPManager struct NMDHCPManager
{ {
NMData * data; NMData * data;
...@@ -87,19 +85,19 @@ static gboolean nm_dhcp_manager_exec_daemon (NMDHCPManager *manager) ...@@ -87,19 +85,19 @@ static gboolean nm_dhcp_manager_exec_daemon (NMDHCPManager *manager)
g_return_val_if_fail (manager != NULL, FALSE); g_return_val_if_fail (manager != NULL, FALSE);
dhcp_argv = g_ptr_array_new (); dhcp_argv = g_ptr_array_new ();
g_ptr_array_add (dhcp_argv, DHCP_DAEMON_PROGRAM); g_ptr_array_add (dhcp_argv, DHCDBD_BINARY_PATH);
g_ptr_array_add (dhcp_argv, "--system"); g_ptr_array_add (dhcp_argv, "--system");
g_ptr_array_add (dhcp_argv, NULL); g_ptr_array_add (dhcp_argv, NULL);
if (!g_spawn_async ("/", (char **) dhcp_argv->pdata, NULL, 0, NULL, NULL, &pid, &error)) if (!g_spawn_async ("/", (char **) dhcp_argv->pdata, NULL, 0, NULL, NULL, &pid, &error))
{ {
g_ptr_array_free (dhcp_argv, TRUE); g_ptr_array_free (dhcp_argv, TRUE);
nm_warning ("Could not activate the DHCP daemon " DHCP_DAEMON_PROGRAM ". error: '%s'.", error->message); nm_warning ("Could not activate the DHCP daemon " DHCDBD_BINARY_PATH ". error: '%s'.", error->message);
g_error_free (error); g_error_free (error);
return FALSE; return FALSE;
} }
g_ptr_array_free (dhcp_argv, TRUE); g_ptr_array_free (dhcp_argv, TRUE);
nm_info ("Activated the DHCP daemon " DHCP_DAEMON_PROGRAM " with PID %d.", pid); nm_info ("Activated the DHCP daemon " DHCDBD_BINARY_PATH " with PID %d.", pid);
return TRUE; return TRUE;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment