[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#255185: Please use hyphens rather than underscores in wireless-* options



Package: netcfg
Version: 0.70
Severity: minor

This is pretty minor, I admit, but the various documents that discuss
options in /etc/network/interfaces have been moving toward a standard of
using hyphens rather than underscores in option names.  Either hyphens
or underscores can be used so this change won't make any functional
difference; however, writing an /e/n/i with hyphenated rather than 
underscored option names may reduce user confusion a wee bit.

The only places I found that write out wireless-* options are dhcp.c
and static.c.  Here's a patch that changes those two files.


--- netcfg-0.70_ORIG/dhcp.c	2004-05-31 02:43:10.000000000 +0200
+++ netcfg-0.70/dhcp.c	2004-06-19 13:00:56.000000000 +0200
@@ -45,11 +45,11 @@
         fprintf(fp, "iface %s inet dhcp\n", iface);
 	if (is_wireless_iface(iface))
 	{
-	  fprintf(fp, "\twireless_mode %s\n",
+	  fprintf(fp, "\twireless-mode %s\n",
 	      (mode == MANAGED) ? "managed" : "adhoc");
-	  fprintf(fp, "\twireless_essid %s\n", essid ? essid : "any");
+	  fprintf(fp, "\twireless-essid %s\n", essid ? essid : "any");
 	  if (wepkey != NULL)
-	    fprintf(fp, "\twireless_key %s\n", wepkey);
+	    fprintf(fp, "\twireless-key %s\n", wepkey);
 	}
         fclose(fp);
     }
--- netcfg-0.70_ORIG/static.c	2004-06-15 06:41:03.000000000 +0200
+++ netcfg-0.70/static.c	2004-06-19 13:02:19.000000000 +0200
@@ -261,12 +261,12 @@
             fprintf(fp, "\tpointopoint %s\n", inet_ntop (AF_INET, &pointopoint, ptr1, sizeof (ptr1)));
 	if (is_wireless_iface(interface))
 	{
-	  fprintf(fp, "\twireless_mode %s\n",
+	  fprintf(fp, "\twireless-mode %s\n",
 	      (mode == MANAGED) ? "managed" : "ad-hoc");
-	  fprintf(fp, "\twireless_essid %s\n", essid ? essid : "any");
+	  fprintf(fp, "\twireless-essid %s\n", essid ? essid : "any");
 
 	  if (wepkey != NULL)
-	    fprintf(fp, "\twireless_key %s\n", wepkey);
+	    fprintf(fp, "\twireless-key %s\n", wepkey);
 	}
         fclose(fp);
     } else





-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (900, 'unstable'), (700, 'testing'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.7
Locale: LANG=en_IE@euro, LC_CTYPE=en_IE@euro



Reply to: