Index: tools/FreeBSD5_x/genesis.conf
===================================================================
--- tools/FreeBSD5_x/genesis.conf	(revision 4940)
+++ tools/FreeBSD5_x/genesis.conf	(revision 4981)
@@ -2,4 +2,6 @@
 #
 # Variable file
+
+$NG = 0;
 
 #debugging variable
@@ -12,4 +14,5 @@
 @filelist = ();
 $filelist[0]="dhcpd.conf";
+$filelist[1]="rc.local"; # Always include (as to overwrite existing file)
 $filelist[2]="rc.node.local";
 $filelist[3]="resolv.conf";
Index: tools/FreeBSD5_x/wleiden.pl
===================================================================
--- tools/FreeBSD5_x/wleiden.pl	(revision 4940)
+++ tools/FreeBSD5_x/wleiden.pl	(revision 4981)
@@ -209,5 +209,6 @@
         $output .= "ifconfig_$if=\"inet $IP{$interface}";
         $output .= " $CARD_OPTION{$interface}";
-        if( $TYPE{$if} =~ /wireless/i ) {
+        if ($TYPE{$if} =~ /wireless/i) {
+	  $output .= "\"\t# rc.local: " unless $NG;
           $output .= " ssid $ESSID{$interface}";
           if( $MODE{$if}=~/master/i ) {
@@ -339,3 +340,39 @@
 };
 
+
+sub rc_local {
+  my $output = genHeader("#");
+  if ($NG) {
+	$output .= "# Replaced by ssid et.al. info in rc.node.local\n";
+	$output .= "exit 0";
+	return $output;
+  }
+  foreach my $if (sort keys %config) {
+    if( ($if =~ /^wi[0-9]$/i) and ($TYPE{$if} =~ /wireless/i) ) {
+      $output .=
+      "$wicontrol -i $if -s $SDESC{$if}    # Nickname\n" .
+      "#$wicontrol -i $if -t 7             # TXrate\n" .
+      "$wicontrol -i $if -P 0              # PowerSave\n" .
+      "$wicontrol -i $if -Z                # Zero SNR cache\n";
+      if( $MODE{$if}=~/master/i ) {
+        $output .=
+        "$wicontrol -i $if -p 6            # hostap mode\n" .
+        "$wicontrol -i $if -c 1            # broadcasting essid on\n" .
+        "$wicontrol -i $if -n $ESSID{$if}  # network name\n" .
+        "$wicontrol -i $if -q $ESSID{$if}  # ESSID\n" .
+        "$wicontrol -i $if -f $CHANNEL{$if}# Channel\n";
+      }
+      else {  
+        $output .=
+        "$wicontrol -i $if -p 1            # Client mode (managed)\n" .
+        "$wicontrol -i $if -n $ESSID{$if}  # ESSID\n" .
+        "# No channel - client follows\n" .
+        "# $wicontrol -i $if -f 0          # Channel\n";
+      };
+    $output .= "\n";
+    };
+  };
+  return($output);
+};
+
 1;
