-diff -Nur NetworkManager-0.4.orig/configure.in NetworkManager-0.4/configure.in
---- NetworkManager-0.4.orig/configure.in 2005-05-19 21:58:50.000000000 +0100
-+++ NetworkManager-0.4/configure.in 2005-05-20 23:22:23.000000000 +0100
-@@ -56,7 +56,7 @@
+diff -urN NetworkManager-0.6.2-o/configure.in NetworkManager-0.6.2/configure.in
+--- NetworkManager-0.6.2-o/configure.in 2006-03-27 09:05:17.000000000 -0700
++++ NetworkManager-0.6.2/configure.in 2006-04-03 13:39:20.000000000 -0600
+@@ -60,7 +60,7 @@
exit 1
else
case $with_distro in
-- redhat|gentoo|debian|slackware) ;;
-+ redhat|gentoo|debian|slackware|pld) ;;
+- redhat|suse|gentoo|debian|slackware) ;;
++ redhat|suse|gentoo|debian|slackware|pld) ;;
*)
echo "Your distribution (${with_distro}) is not yet supported! (patches welcome)"
exit 1
-@@ -68,6 +68,7 @@
+@@ -72,6 +72,7 @@
+ AM_CONDITIONAL(TARGET_GENTOO, test x"$with_distro" = xgentoo)
AM_CONDITIONAL(TARGET_DEBIAN, test x"$with_distro" = xdebian)
- AM_CONDITIONAL(TARGET_MANDRAKE, test x"$with_distro" = xmandrake)
AM_CONDITIONAL(TARGET_SLACKWARE, test x"$with_distro" = xslackware)
+AM_CONDITIONAL(TARGET_PLD, test x"$with_distro" = xpld)
- AC_CHECK_HEADER(iwlib.h, [],
- [AC_MSG_ERROR(iwlib.h not found. Install wireless-tools.)], [])
-diff -Nur NetworkManager-0.4.orig/src/backends/Makefile.am NetworkManager-0.4/src/backends/Makefile.am
---- NetworkManager-0.4.orig/src/backends/Makefile.am 2005-05-16 19:35:20.000000000 +0100
-+++ NetworkManager-0.4/src/backends/Makefile.am 2005-05-20 23:23:16.000000000 +0100
-@@ -24,6 +24,10 @@
+ AC_MSG_CHECKING([for wireless-tools >= 28pre9])
+ AC_TRY_COMPILE([#include <iwlib.h>],
+diff -urN NetworkManager-0.6.2-o/src/backends/Makefile.am NetworkManager-0.6.2/src/backends/Makefile.am
+--- NetworkManager-0.6.2-o/src/backends/Makefile.am 2006-03-09 13:52:16.000000000 -0700
++++ NetworkManager-0.6.2/src/backends/Makefile.am 2006-04-03 13:39:20.000000000 -0600
+@@ -38,6 +38,10 @@
libnmbackend_la_SOURCES += NetworkManagerSlackware.c
endif
libnmbackend_la_LIBADD = $(DBUS_LIBS) $(GTHREAD_LIBS)
libnmbackend_la_CPPFLAGS = $(DBUS_CFLAGS) \
$(GTHREAD_CFLAGS) \
-diff -Nur NetworkManager-0.4.orig/src/backends/NetworkManagerPLD.c NetworkManager-0.4/src/backends/NetworkManagerPLD.c
---- NetworkManager-0.4.orig/src/backends/NetworkManagerPLD.c 1970-01-01 01:00:00.000000000 +0100
-+++ NetworkManager-0.4/src/backends/NetworkManagerPLD.c 2005-05-20 23:22:23.000000000 +0100
-@@ -0,0 +1,232 @@
+diff -urN NetworkManager-0.6.2-o/src/backends/NetworkManagerPLD.c NetworkManager-0.6.2/src/backends/NetworkManagerPLD.c
+--- NetworkManager-0.6.2-o/src/backends/NetworkManagerPLD.c 1969-12-31 17:00:00.000000000 -0700
++++ NetworkManager-0.6.2/src/backends/NetworkManagerPLD.c 2006-04-03 13:39:45.000000000 -0600
+@@ -0,0 +1,430 @@
+/* NetworkManager -- Network link manager
+ *
+ * Narayan Newton <narayan_newton@yahoo.com>
+ * (C) Copyright 2004 RedHat, Inc.
+ * (C) Copyright 2004 Narayan Newton
+ * (C) Copyright 2005 wrobell <wrobell@pld-linux.org>
++ * (C) Copyright 2005 Patryk Zawadzki <patrys@pld-linux.org>
+ */
+
+#include <stdio.h>
+#include <signal.h>
+#include "NetworkManagerSystem.h"
+#include "NetworkManagerUtils.h"
-+#include "NetworkManagerDevice.h"
++#include "nm-device.h"
++#include "nm-device-802-3-ethernet.h"
++#include "nm-device-802-11-wireless.h"
++#include "nm-utils.h"
+
+/*
+ * PLD specific backend based on Slackware backend.
+ */
+void nm_system_init (void)
+{
++ nm_system_kill_all_dhcp_daemons();
+}
+
+/*
+ if (nm_device_is_test_device (dev))
+ return;
+
++ nm_system_device_flush_routes_with_iface (nm_device_get_iface (dev));
++}
++
++/*
++ * nm_system_device_flush_routes_with_iface
++ *
++ * Flush all routes associated with a network device
++ *
++ */
++void nm_system_device_flush_routes_with_iface (const char *iface)
++{
++ char *buf;
++
++ g_return_if_fail (iface != NULL);
++
+ /* Remove routing table entries */
-+ snprintf (buf, 100, "/sbin/ip route flush dev %s", nm_device_get_iface (dev));
++ buf = g_strdup_printf ("/sbin/ip route flush dev %s", iface);
+ nm_spawn_process (buf);
++ g_free (buf);
+}
+
-+
+/*
+ * nm_system_device_flush_addresses
+ *
+ /* Not really applicable for test devices */
+ if (nm_device_is_test_device (dev))
+ return;
++ nm_system_device_flush_addresses_with_iface (nm_device_get_iface (dev));
++}
++
++/*
++ * nm_system_device_flush_addresses_with_iface
++ *
++ * Flush all network addresses associated with a network device
++ *
++ */
++void nm_system_device_flush_addresses_with_iface (const char *iface)
++{
++ char *buf;
++
++ g_return_if_fail (iface != NULL);
+
+ /* Remove all IP addresses for a device */
-+ snprintf (buf, 100, "/sbin/ip address flush dev %s", nm_device_get_iface (dev));
++ buf = g_strdup_printf ("/sbin/ip addr flush dev %s", iface);
+ nm_spawn_process (buf);
++ g_free (buf);
+}
+
-+
+/*
+ * nm_system_device_setup_static_ip4_config
+ *
+ syslog (LOG_WARNING, "nm_system_device_setup_static_ip4_config() is not implemented yet for this distribution.\n");
+}
+
-+
+/*
-+ * nm_system_device_update_config_info
++ * nm_system_device_get_system_config
+ *
+ * Retrieve any relevant configuration info for a particular device
+ * from the system network configuration information. Clear out existing
+ * info before setting stuff too.
+ *
+ */
-+void nm_system_device_update_config_info (NMDevice *dev)
++void *nm_system_device_get_system_config (NMDevice *dev, struct NMData *data)
+{
++ return NULL;
+}
+
++/*
++ * nm_system_device_has_active_routes
++ *
++ * Find out whether the specified device has any routes in the routing
++ * table.
++ *
++ */
++gboolean nm_system_device_has_active_routes (NMDevice *dev)
++{
++ return FALSE;
++}
+
+/*
+ * nm_system_enable_loopback
+ nm_spawn_process ("/sbin/ip addr add 127.0.0.1/8 brd 127.255.255.255 dev lo label loopback");
+}
+
-+
+/*
+ * nm_system_delete_default_route
+ *
+ nm_spawn_process ("/sbin/ip route del default");
+}
+
-+
+/*
+ * nm_system_kill_all_dhcp_daemons
+ *
+ */
+void nm_system_kill_all_dhcp_daemons (void)
+{
-+ nm_spawn_process ("/usr/bin/killall -q dhcpcd");
++ nm_spawn_process ("/bin/killall -q dhcpcd");
+}
+
-+
+/*
+ * nm_system_update_dns
+ *
+ */
+void nm_system_update_dns (void)
+{
++ /* I'm not running nscd */
+}
+
-+
-+/*
-+ * nm_system_load_device_modules
-+ *
-+ * These should already be loaded
-+ *
-+ */
-+void nm_system_load_device_modules (void)
-+{
-+}
-+
-+
+/*
+ * nm_system_restart_mdns_responder
+ *
+ */
+void nm_system_restart_mdns_responder (void)
+{
++ /* not implemented */
+}
+
-+
+/*
+ * nm_system_device_add_ip6_link_address
+ *
+ */
+void nm_system_device_add_ip6_link_address (NMDevice *dev)
+{
++ char *buf;
++ struct ether_addr hw_addr;
++ unsigned char eui[8];
++
++ if (nm_device_is_802_3_ethernet (dev))
++ nm_device_802_3_ethernet_get_address (NM_DEVICE_802_3_ETHERNET (dev), &hw_addr);
++ else if (nm_device_is_802_11_wireless (dev))
++ nm_device_802_11_wireless_get_address (NM_DEVICE_802_11_WIRELESS (dev), &hw_addr);
++
++ memcpy (eui, &(hw_addr.ether_addr_octet), sizeof (hw_addr.ether_addr_octet));
++ memmove (eui+5, eui+3, 3);
++ eui[3] = 0xff;
++ eui[4] = 0xfe;
++ eui[0] ^= 2;
++
++ /* Add the default link-local IPv6 address to a device */
++ buf = g_strdup_printf ("/sbin/ip -6 addr add fe80::%x%02x:%x%02x:%x%02x:%x%02x/64 dev %s",
++ eui[0], eui[1], eui[2], eui[3], eui[4], eui[5],
++ eui[6], eui[7], nm_device_get_iface (dev));
++ nm_spawn_process (buf);
++ g_free (buf);
+}
+
++/*
++ * nm_system_device_add_route_via_device_with_iface
++ *
++ * Add route to the given device
++ *
++ */
++void nm_system_device_add_route_via_device_with_iface (const char *iface, const char *route)
++{
++ char *buf;
++
++ g_return_if_fail (iface != NULL);
++
++ /* Add default gateway */
++ buf = g_strdup_printf ("/sbin/ip route add %s dev %s", route, iface);
++ nm_spawn_process (buf);
++ g_free (buf);
++}
+
+/*
+ * nm_system_device_add_default_route_via_device
+ */
+void nm_system_device_add_default_route_via_device (NMDevice *dev)
+{
++ g_return_if_fail (dev != NULL);
++
++ /* Not really applicable for test devices */
++ if (nm_device_is_test_device (dev))
++ return;
++
++ nm_system_device_add_default_route_via_device_with_iface (nm_device_get_iface (dev));
++}
++
++/*
++ * * nm_system_device_add_default_route_via_device_with_iface
++ * *
++ * * Add default route to the given device
++ * *
++ * */
++void nm_system_device_add_default_route_via_device_with_iface (const char *iface)
++{
++ char *buf;
++
++ g_return_if_fail (iface != NULL);
++
++ /* Add default gateway */
++ buf = g_strdup_printf ("/sbin/ip route add default dev %s", iface);
++ nm_spawn_process (buf);
++ g_free (buf);
+}
-+
-+
++
+/*
+ * nm_system_flush_loopback_routes
+ *
+ */
+void nm_system_flush_loopback_routes (void)
+{
++ /* Remove routing table entries for lo */
++ nm_spawn_process ("/sbin/ip route flush dev lo");
+}
+
-+
+/*
+ * nm_system_flush_arp_cache
+ *
+ */
+void nm_system_flush_arp_cache (void)
+{
++ nm_spawn_process ("/sbin/ip neigh flush all");
+}
+
++void nm_system_deactivate_all_dialup (GSList *list)
++{
++}
++
++gboolean nm_system_deactivate_dialup (GSList *list, const char *dialup)
++{
++ return FALSE;
++}
++
++gboolean nm_system_activate_dialup (GSList *list, const char *dialup)
++{
++ return FALSE;
++}
++
++/*
++ * nm_system_get_dialup_config
++ *
++ * Enumerate dial up options on this system, allocate NMDialUpConfig's,
++ * fill them out, and return.
++ *
++ */
++GSList * nm_system_get_dialup_config (void)
++{
++ return NULL;
++}
++
++void nm_system_device_free_system_config (NMDevice *dev, void *system_config_data)
++{
++}
++
++NMIP4Config *nm_system_device_new_ip4_system_config (NMDevice *dev)
++{
++ return NULL;
++}
++
++gboolean nm_system_device_get_use_dhcp (NMDevice *dev)
++{
++ return TRUE;
++}
++
++/*
++ * nm_system_device_get_disabled
++ *
++ * Return whether the distro-specific system config tells us to use
++ * dhcp for this device.
++ *
++ */
++gboolean nm_system_device_get_disabled (NMDevice *dev)
++{
++ return FALSE;
++}
++
++/*
++ * nm_system_activate_nis
++ *
++ * set up the nis domain and write a yp.conf
++ *
++ */
++void nm_system_activate_nis (NMIP4Config *config)
++{
++}
++
++/*
++ * nm_system_shutdown_nis
++ *
++ * shutdown ypbind
++ *
++ */
++void nm_system_shutdown_nis (void)
++{
++}
++
++/*
++ * nm_system_set_hostname
++ *
++ * set the hostname
++ *
++ */
++void nm_system_set_hostname (NMIP4Config *config)
++{
++}
++
++/*
++ * nm_system_should_modify_resolv_conf
++ *
++ * Can NM update resolv.conf, or is it locked down?
++ */
++gboolean nm_system_should_modify_resolv_conf (void)
++{
++ return TRUE;
++}
++
++
++/*
++ * nm_system_get_mtu
++ *
++ * Return a user-provided or system-mandated MTU for this device or zero if
++ * no such MTU is provided.
++ */
++unsigned int nm_system_get_mtu (NMDevice *dev)
++{
++ return 0;
++}