diff -ur netapplet-0.98.0.orig/src/netdaemon.c netapplet-0.98.0/src/netdaemon.c
--- netapplet-0.98.0.orig/src/netdaemon.c	2004-08-18 12:26:16.000000000 -0400
+++ netapplet-0.98.0/src/netdaemon.c	2004-08-25 13:47:01.677789088 -0400
@@ -27,8 +27,6 @@
 
 #define NETWORK_SYSCONF_PATH    "/etc/sysconfig/network"
 #define IFCFG_PREFIX            "ifcfg-"
-#define GETCFG_CMD		"/sbin/getcfg"
-#define GETCFG_INTERFACE_CMD	"/sbin/getcfg-interface"
 #define IFUP_BIN		"/sbin/ifup"
 #define IFDOWN_BIN		"/sbin/ifdown"
 #define ROUTE_CMD               "/sbin/route"
@@ -87,69 +85,37 @@
 get_interfaces (void)
 {
 	GError *err = NULL;
-	GDir *dir;
 	const char *name;
 	GSList *iface_list = NULL;
+	GIOChannel *file;
+	gchar *data;
+	gchar **ifacedata;
 
-	dir = g_dir_open (NETWORK_SYSCONF_PATH, 0, &err);
-	if (!dir) {
-		g_error ("Unable to open "NETWORK_SYSCONF_PATH": %s",
-			 err->message);
+	file = g_io_channel_new_file ("/etc/conf.d/net", "r", &err);
+	if (!file) {
+                g_warning ("Failed to open %s: %s\n", 
+			   "/etc/conf.d/net", err->message);
+                g_error_free (err);
 		return NULL;
 	}
 
-	do {
-		char *interface;
-		const char *argv[3];
-
-		name = g_dir_read_name (dir);
-		if (name == NULL || strncmp (name, IFCFG_PREFIX,
-					     sizeof (IFCFG_PREFIX) - 1) != 0)
-			continue;
-
-		/* Blacklist the loopback device */
-		if (strcmp (name, IFCFG_PREFIX"lo") == 0)
-			continue;
-
-		argv[0] = GETCFG_INTERFACE_CMD;
-		argv[1] = (char *) name + sizeof (IFCFG_PREFIX) - 1;
-		argv[2] = NULL;
-
-		if (!g_spawn_sync (NULL, (char **) argv, NULL, 0,
-				   NULL, NULL, &interface, NULL,
-				   NULL, &err)) {
-			g_warning ("Unable to execute "
-				   GETCFG_INTERFACE_CMD": %s",
-				   err->message);
-			g_error_free (err);
-			continue;
-		}
-
-		if (interface != NULL && interface[0] != '\0') {
-			/* strip whitespace */
-			interface = g_strstrip (interface);
-
-			/*
-			 * Workaround for some strange behavior in
-			 * getcfg-interface.  If you bring up a ppp0
-			 * interface, and if you run it (as root), it
-			 * might return "no" as the interface name while
-			 * it's in the process of connecting.  If that's
-			 * the case, then return the name as the
-			 * interface instead.
-			 */
-			if (strcmp (interface, "no") == 0) {
-				g_free (interface);
-				interface = g_strdup (argv[1]);
+	while (g_io_channel_read_line (file, &data, NULL, NULL, &err) ==
+	       G_IO_STATUS_NORMAL) {
+		if (g_str_has_prefix (data, "ifconfig_")) {
+			ifacedata = g_strsplit_set (data, "_=", 0);
+			if (strcmp(ifacedata[1],"lo")) {
+				if (!g_slist_find_custom(iface_list,ifacedata[1],
+							 (GCompareFunc)strcmp)) {
+					/* We haven't seen this interface before */
+					iface_list = g_slist_prepend (iface_list,
+								      g_strdup(ifacedata[1]));
+				}
 			}
 
-			iface_list = g_slist_prepend (iface_list, interface);
-		} else
-			g_free (interface);
-
-	} while (name);
-
-	g_dir_close (dir);
+			g_strfreev(ifacedata);
+		}
+		g_free(data);
+	}
 
 	return iface_list;
 }
@@ -676,130 +642,33 @@
 static void
 netdaemon_do_change_essid (GIOChannel *channel, char **args)
 {
-	GString *output;
-	const char *argv[3];
-	char *data = NULL, *getcfg, *p, *cfg;
-	GIOChannel *file;
+	const char *argv[7];
 	GError *err = NULL;
-	char *escaped_essid;
 
-	argv[0] = GETCFG_CMD;
+	argv[0] = g_strdup("/sbin/iwconfig");
 	argv[1] = args[1];
 	argv[2] = NULL;
 
-	/* get the configuration information for this interface */
-	if (!g_spawn_sync (NULL, (char **) argv, NULL, 0, NULL, NULL,
-			   &getcfg, NULL, NULL, &err)) {
-			g_warning ("Unable to execute "GETCFG_CMD": %s",
-				   err->message);
-			g_error_free (err);
-			return;
-	}
-
-	/* get the ifcfg name for this interface */
-	cfg = strstr (getcfg, "HWD_CONFIG_0");
-	if (!cfg) {
-		g_warning ("Unable to determine configuration file for "
-			   "interface %s", args[1]);
-		goto out_free_getcfg;
-	}
-	cfg = strstr (cfg, "=");
-	if (!cfg) {
-		g_warning ("Unable to determine configuration file for "
-			   "interface %s", args[1]);
-		goto out_free_getcfg;
-	}
-	cfg++;
-	p = strstr (cfg, ";");
-	if (!p) {
-		g_warning ("Unable to determine configuration file for "
-			   "interface %s", args[1]);
-		goto out_free_getcfg;
-	}
-	p[0] = '\0';
-	cfg = g_strdup_printf (NETWORK_SYSCONF_PATH"/"IFCFG_PREFIX"%s", cfg);
-
-	output = g_string_sized_new (512);  /* start big to prevent resizing */
-
-	file = g_io_channel_new_file (cfg, "r", &err);
-	if (!file) {
-		g_warning ("Failed to open %s: %s\n", cfg, err->message);
-		g_error_free (err);
-		goto out_free_getcfg;
-	}
-
-	/* remove the offending lines */
-	while (g_io_channel_read_line (file, &data, NULL, NULL, &err) ==
-			G_IO_STATUS_NORMAL) {
-		if (!g_str_has_prefix (data, "WIRELESS_ESSID=") &&
-		    !g_str_has_prefix (data, "WIRELESS_NWID=''") &&
-		    !g_str_has_prefix (data, "WIRELESS_KEY=''") &&
-		    !g_str_has_prefix (data, "WIRELESS_KEY_0=") &&
-		    !g_str_has_prefix (data, "WIRELESS_KEY_LENGTH=") &&
-		    !g_str_has_prefix (data, "WIRELESS_AP") &&
-		    !g_str_has_prefix (data, "WIRELESS_BITRATE") &&
-		    !g_str_has_prefix (data, "WIRELESS_CHANNEL") &&
-		    !g_str_has_prefix (data, "WIRELESS_MODE") &&
-		    !g_str_has_prefix (data, "WIRELESS_FREQUENCY") &&
-		    !g_str_has_prefix (data, "WIRELESS_DEFAULT_KEY="))
-			g_string_append (output, data);
-
-		g_free (data);
-	}
-
-	if (err) {
-		g_warning ("Failed to read %s: %s\n", cfg, err->message);
-		g_error_free (err);
-		goto out;
-	}
-
-	/* add back the updated lines */
-	escaped_essid = escape_essid (args[2]);
-	g_string_append_printf (output, "WIRELESS_ESSID='%s'\n",
-				escaped_essid);
-	g_free (escaped_essid);
-
-	g_string_append_printf (output, "WIRELESS_KEY_0='%s'\n", args[3]);
-
-	/* return the other lines to a nice sane default */
-	g_string_append_printf (output, "WIRELESS_NWID=''\n");
-	g_string_append_printf (output, "WIRELESS_KEY=''\n");
-	g_string_append_printf (output, "WIRELESS_DEFAULT_KEY='0'\n");
-	g_string_append_printf (output, "WIRELESS_KEY_LENGTH='128'\n");
-	g_string_append_printf (output, "WIRELESS_AP=''\n");
-	g_string_append_printf (output, "WIRELESS_BITRATE='auto'\n");
-	g_string_append_printf (output, "WIRELESS_CHANNEL=''\n");
-	g_string_append_printf (output, "WIRELESS_MODE='Managed'\n");
-	g_string_append_printf (output, "WIRELESS_FREQUENCY=''");
-
-	/* close, truncate, and reopen the file for writing */
-	g_io_channel_unref (file);
-	file = g_io_channel_new_file (cfg, "w", &err);
-	if (!file) {
-		g_warning ("Failed to open %s: %s\n", cfg, err->message);
-		g_error_free (err);
-		goto out;
+	argv[2] = g_strdup("essid");
+	argv[3] = args[2];
+	if (strcmp(args[3],"")) {
+		argv[4] = g_strdup("key");
+		argv[5] = args[3];
+		argv[6] = NULL;
+	} else {
+		argv[4] = NULL;
+		argv[5] = NULL;
+		argv[6] = NULL;
 	}
 
-	/* write out the new file in one swoop */
-	if (g_io_channel_write_chars (file, output->str, -1, NULL, &err) !=
-			G_IO_STATUS_NORMAL) {
-		g_warning ("Failed to write to %s: %s\n", cfg, err->message);
-		g_error_free (err);
-		goto out;
+	if (!g_spawn_sync (NULL, (char **) argv, NULL, 0, NULL, NULL,
+			   NULL, NULL, NULL, &err)) {
+		g_warning("Unable to execute iwconfig: %s",
+			  err->message);
+		g_error_free(err);
 	}
 
-	g_io_channel_flush (file, NULL);
-
-	netdaemon_do_change_active (channel, args);
-
-out:
-	g_string_free (output, TRUE);
-	g_io_channel_unref (file);
-	g_free (cfg);
-
-out_free_getcfg:
-	g_free (getcfg);
+	return;
 }
 
 static void
