[Setup-tool-hackers] perl -w



> Lets turn warnings on ... 'env' seems to make this slightly
> more difficult, but not impossible I suspect. Either way, here are a
> batch of minor -w type issues, none of them looking that serious (
> after all it works doesn't it :-):
...
> Anyone feel like taking them on ? the facility is quite
> useless with so many low level sillies in there.

I'll take 'em on.  Attached is a unified diff patch against the backends
directory.  All warnings but the "used only once" ones should be
squashed.  The number of lines of warnings have been reduced from 494 to
57.

network.pl.in required lot's of changes due to the unquoted strings in
the various tables.  Give that file a close look to make sure my Emacs
macros and my fat fingers didn't subtly munge anything.

BTW, when creating lists of strings, qw() is very useful.  Words inside
of qw do not need to be quoted and do not need to be comma-separated.  I
saw a few places in the code where qw would have saved alot of typing
and would have avoided "unquoted string may clash with keyword"
warnings.

/ryan

diff --exclude=CVS --exclude=Makefile.in -urN ximian-setup-tools.vanilla/backends/boot-conf.in ximian-setup-tools/backends/boot-conf.in
--- ximian-setup-tools.vanilla/backends/boot-conf.in	Tue Mar 13 16:48:00 2001
+++ ximian-setup-tools/backends/boot-conf.in	Wed Mar 21 20:26:55 2001
@@ -64,7 +64,7 @@
 
 sub xml_parse
 {
-  my $tree, %hash;
+  my ($tree, %hash);
   # Scan XML to tree.
 
   $tree = &xst_xml_scan;
@@ -156,7 +156,7 @@
   my @tags = ('boot', 'default', 'delay', 'install', 'map', 'message', 'timeout', 'verbose',
               'append', 'root');
   
-  my $i, $val;
+  my ($i, $val);
 
   while ($i = shift @tags)
   {
@@ -170,7 +170,7 @@
 sub xml_print_images
 {
   my ($h, $image) = @_;
-  my $i, $val, $array;
+  my ($i, $val, $array);
 
   $array = $$h{$image};
 
diff --exclude=CVS --exclude=Makefile.in -urN ximian-setup-tools.vanilla/backends/boot.pl.in ximian-setup-tools/backends/boot.pl.in
--- ximian-setup-tools.vanilla/backends/boot.pl.in	Tue Feb 27 23:46:40 2001
+++ ximian-setup-tools/backends/boot.pl.in	Wed Mar 21 21:37:05 2001
@@ -124,7 +124,7 @@
 sub xst_boot_set_global_kw
 {
   my ($file, $key) = @_;
-  my $buff, $i, $found;
+  my ($buff, $i, $found);
 
   $buff = &xst_buffer_load ($file);
   $found = 0;
@@ -161,7 +161,7 @@
 sub xst_boot_set_global
 {
   my ($file, $key, $val) = @_;
-  my $buff, $i, $found;
+  my ($buff, $i, $found);
 
   $buff = &xst_buffer_load ($file);
   $found = 0;
@@ -202,7 +202,7 @@
 sub xst_boot_del_global
 {
   my ($file, $key) = @_;
-  my $buff, $i;
+  my ($buff, $i);
 
   $buff = &xst_buffer_load ($file);
 
@@ -255,7 +255,7 @@
 sub xst_boot_conf_set_images
 {
   my ($fn, $key, $images) = @_;
-  my %hash, $i, @tmp_images;
+  my (%hash, $i, @tmp_images);
 
   @tmp_images = @$images;
   
@@ -271,9 +271,9 @@
 sub xst_boot_conf_replace_image
 {
   my ($file, %image) = @_;
-  my $buff, $i, $found;
-  my $pre_space, $post_comment;
-  my @line, $key, $op, $txt;
+  my ($buff, $i, $found);
+  my ($pre_space, $post_comment);
+  my (@line, $key, $op, $txt);
 
   $buff = &xst_buffer_load ($file);
   &xst_buffer_join_lines ($buff);
diff --exclude=CVS --exclude=Makefile.in -urN ximian-setup-tools.vanilla/backends/debug.pl.in ximian-setup-tools/backends/debug.pl.in
--- ximian-setup-tools.vanilla/backends/debug.pl.in	Tue Mar 13 12:15:44 2001
+++ ximian-setup-tools/backends/debug.pl.in	Wed Mar 21 20:00:52 2001
@@ -29,7 +29,7 @@
 sub xst_debug_open_output_file
 {
   local *FILE;
-  my $debug_path = &xst_file_get_debug_path () . "/$xst_name/1/@_[0]";
+  my $debug_path = &xst_file_get_debug_path () . "/$xst_name/1/$_[0]";
 
   &xst_debug_rotate_try ();
   open (FILE, ">>$debug_path");
@@ -41,8 +41,8 @@
 {
   my $debug_file;
 
-  $debug_file = &xst_debug_open_output_file (@_[0]);
-  print $debug_file @_[1];
+  $debug_file = &xst_debug_open_output_file ($_[0]);
+  print $debug_file $_[1];
 
   close $debug_file;
 }
@@ -63,7 +63,7 @@
 
 sub xst_debug_print_indent
 {
-  my $indent = @_[0];
+  my $indent = $_[0];
   my $indent_string = "";
   my $i;
 
@@ -104,9 +104,9 @@
 
 sub xst_debug_print_struct_r
 {
-  my ($indent) = @_[0];
-  my $is_hash_value = @_[1];
-  my $a = @_[2];
+  my ($indent) = $_[0];
+  my $is_hash_value = $_[1];
+  my $a = $_[2];
   my $type;
   my @keys;
   my $elem;
@@ -152,7 +152,8 @@
 
 sub xst_debug_rotate_try
 {
-  my $debug_file = @_[0];
+
+  my $debug_file = $_[0];
   my $debug_tool_dir = &xst_file_get_debug_path () . "/$xst_name/";
 
   # If this is the first debug created by this tool on this invocation,
diff --exclude=CVS --exclude=Makefile.in -urN ximian-setup-tools.vanilla/backends/file.pl.in ximian-setup-tools/backends/file.pl.in
--- ximian-setup-tools.vanilla/backends/file.pl.in	Tue Mar 20 00:23:13 2001
+++ ximian-setup-tools/backends/file.pl.in	Wed Mar 21 19:57:42 2001
@@ -97,7 +97,7 @@
 
 sub xst_backup_file
 {
-  my $backup_file = @_[0];
+  my $backup_file = $_[0];
   my $backup_tool_dir = &xst_file_get_backup_path () . "/$xst_name/";
 
   # If this is the first backup created by this tool on this invocation,
@@ -311,7 +311,7 @@
 sub xst_buffer_save
 {
   my ($buffer, $file) = @_;
-  my $fd, $i;
+  my ($fd, $i);
 
   &xst_debug_print_string ("\nfile:$file\n");
 
@@ -384,7 +384,7 @@
   my ($tool_name, $tool_path, @argline);
   my $command;
 
-  ($tool_name, @argline) = split(/ /, @_[0]);
+  ($tool_name, @argline) = split(/ /, $_[0]);
 
   $tool_path = &xst_locate_tool ($tool_name);
   if ($tool_path eq "")
diff --exclude=CVS --exclude=Makefile.in -urN ximian-setup-tools.vanilla/backends/general.pl.in ximian-setup-tools/backends/general.pl.in
--- ximian-setup-tools.vanilla/backends/general.pl.in	Thu Mar  8 16:31:50 2001
+++ ximian-setup-tools/backends/general.pl.in	Wed Mar 21 19:52:10 2001
@@ -168,9 +168,9 @@
 
   # Set backend descriptors.
 
-  $xst_name = @args[0];
-  $xst_version = @args[1];
-  $xst_description = @args[2];
+  $xst_name = $args[0];
+  $xst_version = $args[1];
+  $xst_description = $args[2];
   shift @args; shift @args; shift @args;
 
   # Parse arguments.
diff --exclude=CVS --exclude=Makefile.in -urN ximian-setup-tools.vanilla/backends/media.pl.in ximian-setup-tools/backends/media.pl.in
--- ximian-setup-tools.vanilla/backends/media.pl.in	Tue Mar 13 13:15:52 2001
+++ ximian-setup-tools/backends/media.pl.in	Wed Mar 21 20:03:56 2001
@@ -33,10 +33,10 @@
 
 sub xst_media_get_ide_device_from_proc
 {
-  my ($path) = "/proc/ide/@_[0]/@_[1]";
+  my ($path) = "/proc/ide/$_[0]/$_[1]";
   my (%device);
 
-  %device->{"device"}   = @_[1];
+  %device->{"device"}   = $_[1];
   %device->{"type"}     = "ide";
   %device->{"media"}    = &xst_parse_line_first ("$path/media");
   %device->{"model"}    = &xst_parse_line_first ("$path/model");
@@ -62,10 +62,10 @@
   {
     %device->{"is_removable"} = 1;
 
-    %device->{"point_listed"} = &xst_parse_split_first_str ("/etc/fstab", "/dev/@_[1]", "[ \t]+");
-    %device->{"point_actual"} = &xst_parse_split_first_str ("/etc/mtab", "/dev/@_[1]", "[ \t]+");
-    %device->{"fs_listed"}    = (&xst_parse_split_all ("/etc/fstab", "/dev/@_[1]", "[ \t]+")) -> [1];
-    %device->{"fs_actual"}    = (&xst_parse_split_all ("/etc/mtab", "/dev/@_[1]", "[ \t]+")) -> [1];
+    %device->{"point_listed"} = &xst_parse_split_first_str ("/etc/fstab", "/dev/$_[1]", "[ \t]+");
+    %device->{"point_actual"} = &xst_parse_split_first_str ("/etc/mtab", "/dev/$_[1]", "[ \t]+");
+    %device->{"fs_listed"}    = (&xst_parse_split_all ("/etc/fstab", "/dev/$_[1]", "[ \t]+")) -> [1];
+    %device->{"fs_actual"}    = (&xst_parse_split_all ("/etc/mtab", "/dev/$_[1]", "[ \t]+")) -> [1];
 
     if (%device->{"point_actual"})
     {
diff --exclude=CVS --exclude=Makefile.in -urN ximian-setup-tools.vanilla/backends/memory-conf.in ximian-setup-tools/backends/memory-conf.in
--- ximian-setup-tools.vanilla/backends/memory-conf.in	Mon Mar 12 19:27:21 2001
+++ ximian-setup-tools/backends/memory-conf.in	Wed Mar 21 21:35:00 2001
@@ -284,7 +284,7 @@
 
   for $dev (@check_devs)
   {
-    my $disk, $device, $point, $fs, $options, $check, $size, $bootable;
+    my ($disk, $device, $point, $fs, $options, $check, $size, $bootable);
     
     &xst_report_info(01, "Looking for partitions on $dev");
 
@@ -295,16 +295,16 @@
       {
         @line = split(/[ \n\r\t]+/, $_);
 
-        $device = @line[0]; shift @line;
+        $device = $line[0]; shift @line;
         ($disk) = ($device =~ /([a-zA-Z\/]+)/);
 
         shift @line; shift @line;  # Start and end clusters.
 
-        ($size) = (@line[0] =~ /([0-9]+)/);
+        ($size) = ($line[0] =~ /([0-9]+)/);
 	$size = sprintf ("%.1fMB", $size / 1024);
         shift @line;
 
-        if (@line[0] ne "82") { next; }  # Not Swap
+        if ($line[0] ne "82") { next; }  # Not Swap
         else
 	  {
 	    push @cf_partition, {
diff --exclude=CVS --exclude=Makefile.in -urN ximian-setup-tools.vanilla/backends/network-conf.in ximian-setup-tools/backends/network-conf.in
--- ximian-setup-tools.vanilla/backends/network-conf.in	Fri Mar 16 01:54:13 2001
+++ ximian-setup-tools/backends/network-conf.in	Wed Mar 21 20:43:25 2001
@@ -73,7 +73,7 @@
 
 sub xml_parse
 {
-  my $tree, %hash;
+  my ($tree, %hash);
   # Scan XML to tree.
 
   $tree = &xst_xml_scan;
@@ -209,7 +209,7 @@
 sub xml_print_statichost
 {
   my ($h) = $_[0];
-  my $statichost, $i, $j, $val;
+  my ($statichost, $i, $j, $val);
   
   &xst_xml_print_vspace ();
   foreach $i (keys %{$$h{"statichost"}})
@@ -233,10 +233,10 @@
 {
   my $h = $_[0];
   my @scalar_keys =
-	 (auto, forward, hostname, domain, domainname,
-	  hostmatch, workgroup, description, winsserver, winsuse);
+	 qw(auto forward hostname domain domainname
+	  hostmatch workgroup description winsserver winsuse);
   my @array_keys =
-	 (nameserver, searchdomain, order);
+	 qw(nameserver searchdomain order);
 
   &xst_xml_print_begin ();
 
diff --exclude=CVS --exclude=Makefile.in -urN ximian-setup-tools.vanilla/backends/network.pl.in ximian-setup-tools/backends/network.pl.in
--- ximian-setup-tools.vanilla/backends/network.pl.in	Tue Mar 20 21:44:22 2001
+++ ximian-setup-tools/backends/network.pl.in	Wed Mar 21 21:27:12 2001
@@ -56,8 +56,8 @@
        );
   
   my ($file) = @_;
-  my %ret, @sections;
-  my $i, $j, $name, $val;
+  my (%ret, @sections);
+  my ($i, $j, $name, $val);
 
   &xst_run ("wvdialconf $xst_prefix/$file") if (!-e "$xst_prefix/$file");
   
@@ -127,7 +127,7 @@
 sub xst_network_sysconfig_ifaces_get_existing
 {
   local *IFACE_DIR;
-  my @ret, $i, $name;
+  my (@ret, $i, $name);
   
   if (opendir IFACE_DIR, "$xst_prefix/etc/sysconfig/network-scripts")
   {
@@ -149,7 +149,7 @@
 
 sub xst_network_debian_ifaces_get_existing
 {
-  my @ret, @stanzas, $stanza;
+  my (@ret, @stanzas, $stanza);
   
   @stanzas = &xst_parse_interfaces_stanzas ("$xst_prefix/etc/network/interfaces");
 
@@ -283,9 +283,9 @@
 	  "unknown" => "#i#"
 	  );
   my ($file, $values_hash) = @_;
-  my %hash, $section;
+  my (%hash, $section);
   my $ret;
-  my $i, $j;
+  my ($i, $j);
 
   foreach $i (keys %$values_hash)
   {
@@ -350,7 +350,7 @@
 sub xst_network_remove_pap_entry
 {
   my ($file, $login) = @_;
-  my $i, $buff;
+  my ($i, $buff);
 
   $buff = &xst_buffer_load ($file);
 
@@ -414,8 +414,8 @@
 sub xst_network_interface_set
 {
   my ($dev, $values_hash, $old_hash) = @_;
-  my %dist_attrib, %fn;
-  my $proc, $i, $res;
+  my (%dist_attrib, %fn);
+  my ($proc, $i, $res);
   
   %dist_attrib = &xst_network_get_interface_replace_table ();
   $proc = $dist_attrib{"iface_set"};
@@ -495,7 +495,7 @@
 sub xst_network_get_ppp_options_re
 {
   my ($file, $re) = @_;
-  my $fd, @res;
+  my ($fd, @res);
 
   $fd = &xst_open_read_from_names ("$file");
   return undef if !$fd;
@@ -514,7 +514,7 @@
 sub xst_network_set_ppp_options_re
 {
   my ($file, $re, $value) = @_;
-  my $buff, $line, $replaced;
+  my ($buff, $line, $replaced);
 
   $buff = &xst_buffer_load ($file);
 
@@ -543,7 +543,7 @@
 sub xst_network_get_ppp_options_unsup
 {
   my ($file) = @_;
-  my $fd, $line, $res, $re;
+  my ($fd, $line, $res, $re);
   my @known_options = ("usepeerdns", "mtu", "mru", "user", "/dev/[^ \t]+", "[0-9]+",
                        "defaultroute", "debug", "persist", "escape", "crtscts", "connect",
                        "remotename", "hide-password", "noauth", "noipdefault", "ipparam");
@@ -573,7 +573,7 @@
 sub xst_network_set_ppp_options_unsup
 {
   my ($file, $value) = @_;
-  my $buff, $line, $re;
+  my ($buff, $line, $re);
   my @known_options = ("usepeerdns", "mtu", "mru", "user", "/dev/[^ \t]+", "[0-9]+",
                        "defaultroute", "debug", "persist", "escape", "crtscts", "connect",
                        "remotename", "hide-password", "noauth", "noipdefault", "ipparam");
@@ -628,7 +628,7 @@
 sub xst_network_deb22_parse_bootproto
 {
   my ($file, $iface) = @_;
-  my @stanzas, $stanza, $method, $bootproto;
+  my (@stanzas, $stanza, $method, $bootproto);
   my %debian_to_proto_name =
       (
        "bootp"    => "bootp",
@@ -665,7 +665,7 @@
 sub xst_network_deb22_replace_bootproto
 {
   my ($file, $iface, $value) = @_;
-  my @stanzas, $stanza, $method, $bootproto;
+  my (@stanzas, $stanza, $method, $bootproto);
   my %proto_name_to_debian =
       (
        "bootp"    => "bootp",
@@ -692,7 +692,7 @@
 sub xst_network_debian_parse_remote_address
 {
   my ($file, $iface) = @_;
-  my $str, @tuples, $tuple, @res;
+  my ($str, @tuples, $tuple, @res);
   
   @tuples = &xst_parse_interfaces_option_tuple ($file, $iface, "up", 1);
 
@@ -823,21 +823,21 @@
 		 WVDIAL       => "/etc/wvdial.conf" },
 	    table =>
 		   [
-		    [ forward,       \&xst_parse_sh_bool,           SYSCONFIG_NW, FORWARD_IPV4 ],
-		    [ hostname,      \&xst_parse_sh,                SYSCONFIG_NW, HOSTNAME ],
-		    [ domain,        \&xst_parse_sh,                SYSCONFIG_NW, DOMAIN],
-		    [ nameserver,    \&xst_parse_split_all,         RESOLV_CONF,  nameserver, "[ \t]+" ],
-		    [ searchdomain,  \&xst_parse_split_first_array, RESOLV_CONF,  search, "[ \t]+", "[ \t]+" ],
-		    [ domainname,    \&xst_parse_split_first_str,   RESOLV_CONF,  domain, "[ \t]+" ],
-		    [ order,         \&xst_parse_split_first_array, HOST_CONF,    order, "[ \t]+", "," ],
-		    [ hostmatch,     \&xst_parse_split_first_bool,  HOST_CONF,    multi, "[ \t]+" ],
-		    [ statichost,    \&xst_parse_split_hash,        HOSTS,        "[ \t]+", "[ \t]+" ],
-		    [ workgroup,     \&xst_parse_ini,               SMB_CONF,     "global", "workgroup" ],     
-		    [ description,   \&xst_parse_ini,               SMB_CONF,     "global", "server string" ],    
-		    [ winsserver,    \&xst_parse_ini,               SMB_CONF,     "global", "wins server" ],
-		    [ winsuse,       \&xst_parse_ini_bool,          SMB_CONF,     "global", "wins support" ],
-		    [ dialing,       \&xst_network_dialing_get,     WVDIAL ],
-		    [ interface,     \&xst_network_interfaces_get ]
+		    [ "forward",       \&xst_parse_sh_bool,           SYSCONFIG_NW, FORWARD_IPV4 ],
+		    [ "hostname",      \&xst_parse_sh,                SYSCONFIG_NW, HOSTNAME ],
+		    [ "domain",        \&xst_parse_sh,                SYSCONFIG_NW, DOMAIN ],
+		    [ "nameserver",    \&xst_parse_split_all,         RESOLV_CONF,  "nameserver", "[ \t]+" ],
+		    [ "searchdomain",  \&xst_parse_split_first_array, RESOLV_CONF,  "search", "[ \t]+", "[ \t]+" ],
+		    [ "domainname",    \&xst_parse_split_first_str,   RESOLV_CONF,  "domain", "[ \t]+" ],
+		    [ "order",         \&xst_parse_split_first_array, HOST_CONF,    "order", "[ \t]+", "," ],
+		    [ "hostmatch",     \&xst_parse_split_first_bool,  HOST_CONF,    "multi", "[ \t]+" ],
+		    [ "statichost",    \&xst_parse_split_hash,        HOSTS,        "[ \t]+", "[ \t]+" ],
+		    [ "workgroup",     \&xst_parse_ini,               SMB_CONF,     "global", "workgroup" ],     
+		    [ "description",   \&xst_parse_ini,               SMB_CONF,     "global", "server string" ],    
+		    [ "winsserver",    \&xst_parse_ini,               SMB_CONF,     "global", "wins server" ],
+		    [ "winsuse",       \&xst_parse_ini_bool,          SMB_CONF,     "global", "wins support" ],
+		    [ "dialing",       \&xst_network_dialing_get,     WVDIAL ],
+		    [ "interface",     \&xst_network_interfaces_get ]
 		    ]
 			 },
 
@@ -855,21 +855,21 @@
         WVDIAL      => "/etc/wvdial.conf" },
 	    table =>
           [
-           [ forward,       \&xst_parse_sh_bool,           OPTIONS, ip_forward ],
-           [ hostname,      \&xst_parse_line_first,        HOSTNAME ],
-           [ domain,				\&xst_parse_split_first_str,   RESOLV_CONF,  domain, "[ \t]+" ],
-           [ nameserver,    \&xst_parse_split_all,         RESOLV_CONF,  nameserver, "[ \t]+" ],
-           [ searchdomain,  \&xst_parse_split_first_array, RESOLV_CONF,  search, "[ \t]+", "[ \t]+" ],
-           [ domainname,    \&xst_parse_split_first_str,   RESOLV_CONF,  domain, "[ \t]+" ],
-           [ order,         \&xst_parse_split_first_array, HOST_CONF,    order, "[ \t]+", "," ],
-           [ hostmatch,     \&xst_parse_split_first_bool,  HOST_CONF,    multi, "[ \t]+" ],
-           [ statichost,    \&xst_parse_split_hash,        HOSTS,        "[ \t]+", "[ \t]+" ],
-           [ workgroup,     \&xst_parse_ini,               SMB_CONF,     "global", "workgroup" ],     
-           [ description,   \&xst_parse_ini,               SMB_CONF,     "global", "server string" ],    
-           [ winsserver,    \&xst_parse_ini,               SMB_CONF,     "global", "wins server" ],
-           [ winsuse,       \&xst_parse_ini_bool,          SMB_CONF,     "global", "wins support" ],
-           [ dialing,       \&xst_network_dialing_get,     WVDIAL ],
-           [ interface,     \&xst_network_interfaces_get ]
+           [ "forward",       \&xst_parse_sh_bool,           OPTIONS, "ip_forward" ],
+           [ "hostname",      \&xst_parse_line_first,        HOSTNAME ],
+           [ "domain",				\&xst_parse_split_first_str,   RESOLV_CONF,  "domain", "[ \t]+" ],
+           [ "nameserver",    \&xst_parse_split_all,         RESOLV_CONF,  "nameserver", "[ \t]+" ],
+           [ "searchdomain",  \&xst_parse_split_first_array, RESOLV_CONF,  "search", "[ \t]+", "[ \t]+" ],
+           [ "domainname",    \&xst_parse_split_first_str,   RESOLV_CONF,  "domain", "[ \t]+" ],
+           [ "order",         \&xst_parse_split_first_array, HOST_CONF,    "order", "[ \t]+", "," ],
+           [ "hostmatch",     \&xst_parse_split_first_bool,  HOST_CONF,    "multi", "[ \t]+" ],
+           [ "statichost",    \&xst_parse_split_hash,        HOSTS,        "[ \t]+", "[ \t]+" ],
+           [ "workgroup",     \&xst_parse_ini,               SMB_CONF,     "global", "workgroup" ],     
+           [ "description",   \&xst_parse_ini,               SMB_CONF,     "global", "server string" ],    
+           [ "winsserver",    \&xst_parse_ini,               SMB_CONF,     "global", "wins server" ],
+           [ "winsuse",       \&xst_parse_ini_bool,          SMB_CONF,     "global", "wins support" ],
+           [ "dialing",       \&xst_network_dialing_get,     WVDIAL ],
+           [ "interface",     \&xst_network_interfaces_get ]
            ]
              }
 	  );
@@ -906,36 +906,36 @@
         CHAP  => "/etc/ppp/chap-secrets" },
 	    table =>
           [
-           [ bootproto,          \&xst_network_rh62_parse_bootproto, IFCFG, BOOTPROTO ],
-           [ auto,               \&xst_parse_sh_bool, IFCFG, ONBOOT ],
-           [ user,               \&xst_parse_sh_bool, IFCFG, USERCTL ],
-           [ name,               \&xst_parse_sh,      IFCFG, NAME ],
-           [ dev,                \&xst_parse_sh,      IFCFG, DEVICE ],
-           [ address,            \&xst_parse_sh,      IFCFG, IPADDR ],
-           [ netmask,            \&xst_parse_sh,      IFCFG, NETMASK ],
-           [ broadcast,          \&xst_parse_sh,      IFCFG, BROADCAST ],
-           [ network,            \&xst_parse_sh,      IFCFG, NETWORK ],
-           [ gateway,            \&xst_parse_sh,      IFCFG, GATEWAY ],
-           [ peerdns,            \&xst_parse_sh_bool, IFCFG, PEERDNS ],
-           [ dns1,               \&xst_parse_sh,      IFCFG, DNS1 ],
-           [ dns2,               \&xst_parse_sh,      IFCFG, DNS2 ],
-           [ mtu,                \&xst_parse_sh,      IFCFG, MTU ],
-           [ mru,                \&xst_parse_sh,      IFCFG, MRU ],
-           [ remote_address,     \&xst_parse_sh,      IFCFG, REMIP ],
-           [ login,              \&xst_parse_sh,      IFCFG, PAPNAME ],
-           [ password,           \&xst_network_get_pap_passwd, PAP, "%login%" ],
-           [ password,           \&xst_network_get_pap_passwd, CHAP, "%login%" ],
-           [ serial_port,        \&xst_parse_sh,      IFCFG, MODEMPORT ],
-           [ serial_speed,       \&xst_parse_sh,      IFCFG, LINESPEED ],
-           [ ppp_options,        \&xst_parse_sh,      IFCFG, PPPOPTIONS ],
-           [ wvsection,          \&xst_parse_sh,      IFCFG, WVDIALSECT ],
-           [ set_default_gw,     \&xst_parse_sh_bool, IFCFG, DEFROUTE ],
-           [ debug,              \&xst_parse_sh_bool, IFCFG, DEBUG ],
-           [ persist,            \&xst_parse_sh_bool, IFCFG, PERSIST ],
-           [ serial_escapechars, \&xst_parse_sh_bool, IFCFG, ESCAPECHARS ],
-           [ serial_hwctl,       \&xst_parse_sh_bool, IFCFG, HARDFLOWCTL ],
-           [ phone_number,       \&xst_parse_chat,    CHAT, "^atd[^0-9]*([0-9, -]+)" ],
-           [ enabled,            \&xst_network_interface_active, IFACE, \&xst_network_active_interfaces_get ]
+           [ "bootproto",          \&xst_network_rh62_parse_bootproto, IFCFG, BOOTPROTO ],
+           [ "auto",               \&xst_parse_sh_bool, IFCFG, ONBOOT ],
+           [ "user",               \&xst_parse_sh_bool, IFCFG, USERCTL ],
+           [ "name",               \&xst_parse_sh,      IFCFG, NAME ],
+           [ "dev",                \&xst_parse_sh,      IFCFG, DEVICE ],
+           [ "address",            \&xst_parse_sh,      IFCFG, IPADDR ],
+           [ "netmask",            \&xst_parse_sh,      IFCFG, NETMASK ],
+           [ "broadcast",          \&xst_parse_sh,      IFCFG, BROADCAST ],
+           [ "network",            \&xst_parse_sh,      IFCFG, NETWORK ],
+           [ "gateway",            \&xst_parse_sh,      IFCFG, GATEWAY ],
+           [ "peerdns",            \&xst_parse_sh_bool, IFCFG, PEERDNS ],
+           [ "dns1",               \&xst_parse_sh,      IFCFG, DNS1 ],
+           [ "dns2",               \&xst_parse_sh,      IFCFG, DNS2 ],
+           [ "mtu",                \&xst_parse_sh,      IFCFG, MTU ],
+           [ "mru",                \&xst_parse_sh,      IFCFG, MRU ],
+           [ "remote_address",     \&xst_parse_sh,      IFCFG, REMIP ],
+           [ "login",              \&xst_parse_sh,      IFCFG, PAPNAME ],
+           [ "password",           \&xst_network_get_pap_passwd, PAP, "%login%" ],
+           [ "password",           \&xst_network_get_pap_passwd, CHAP, "%login%" ],
+           [ "serial_port",        \&xst_parse_sh,      IFCFG, MODEMPORT ],
+           [ "serial_speed",       \&xst_parse_sh,      IFCFG, LINESPEED ],
+           [ "ppp_options",        \&xst_parse_sh,      IFCFG, PPPOPTIONS ],
+           [ "wvsection",          \&xst_parse_sh,      IFCFG, WVDIALSECT ],
+           [ "set_default_gw",     \&xst_parse_sh_bool, IFCFG, DEFROUTE ],
+           [ "debug",              \&xst_parse_sh_bool, IFCFG, DEBUG ],
+           [ "persist",            \&xst_parse_sh_bool, IFCFG, PERSIST ],
+           [ "serial_escapechars", \&xst_parse_sh_bool, IFCFG, ESCAPECHARS ],
+           [ "serial_hwctl",       \&xst_parse_sh_bool, IFCFG, HARDFLOWCTL ],
+           [ "phone_number",       \&xst_parse_chat,    CHAT, "^atd[^0-9]*([0-9, -]+)" ],
+           [ "enabled",            \&xst_network_interface_active, IFACE, \&xst_network_active_interfaces_get ]
            ]
              },
 
@@ -953,36 +953,36 @@
         CHAP        => "/etc/ppp/chap-secrets" },
 	    table =>
           [
-           [ user,               \&xst_parse_trivial,                  0 ], # not supported.
-           [ dev,                \&xst_parse_trivial,                  IFACE ],
-           [ bootproto,          \&xst_network_deb22_parse_bootproto,  [INTERFACES, IFACE]],
-           [ auto,               \&xst_parse_interfaces_option_kw_not, [INTERFACES, IFACE], noauto ],
-           [ name,               \&xst_parse_interfaces_option_str,    [INTERFACES, IFACE], name ],
-           [ address,            \&xst_parse_interfaces_option_str,    [INTERFACES, IFACE], address ],
-           [ netmask,            \&xst_parse_interfaces_option_str,    [INTERFACES, IFACE], netmask ],
-           [ broadcast,          \&xst_parse_interfaces_option_str,    [INTERFACES, IFACE], broadcast ],
-           [ network,            \&xst_parse_interfaces_option_str,    [INTERFACES, IFACE], network ],
-           [ gateway,            \&xst_parse_interfaces_option_str,    [INTERFACES, IFACE], gateway ],
-           [ wvsection,          \&xst_parse_interfaces_option_str,    [INTERFACES, IFACE], provider ],
-           [ peerdns,            \&xst_parse_kw,                       PPP_OPTIONS, usepeerdns ],
-           [ dns1,               \&xst_parse_trivial,                  "" ], # not supported.
-           [ dns2,               \&xst_parse_trivial,                  "" ], # not supported.
-           [ mtu,                \&xst_parse_split_first_str,          PPP_OPTIONS, mtu, "[ \t]+" ],
-           [ mru,                \&xst_parse_split_first_str,          PPP_OPTIONS, mru, "[ \t]+" ],
-           [ remote_address,     \&xst_network_debian_parse_remote_address, [INTERFACES, IFACE]],
-           [ login,              \&xst_parse_split_first_str,          PPP_OPTIONS, user, "[ \t]+" ],
-           [ password,           \&xst_network_get_pap_passwd,         PAP, "%login%" ],
-           [ password,           \&xst_network_get_pap_passwd,         CHAP, "%login%" ],
-           [ serial_port,        \&xst_network_get_ppp_options_re,     PPP_OPTIONS, "^(/dev/[^ \t]+)" ],
-           [ serial_speed,       \&xst_network_get_ppp_options_re,     PPP_OPTIONS, "^([0-9]+)" ],
-           [ ppp_options,        \&xst_network_get_ppp_options_unsup,  PPP_OPTIONS ],
-           [ set_default_gw,     \&xst_parse_kw,                       PPP_OPTIONS, defaultroute ],
-           [ debug,              \&xst_parse_kw,                       PPP_OPTIONS, debug ],
-           [ persist,            \&xst_parse_kw,                       PPP_OPTIONS, persist ],
-           [ serial_escapechars, \&xst_parse_split_first_str,          PPP_OPTIONS, escape, "[ \t]+" ],
-           [ serial_hwctl,       \&xst_parse_kw,                       PPP_OPTIONS, crtscts ],
-           [ phone_number,       \&xst_parse_chat,                     CHAT, "^atd[^0-9]*([0-9, -]+)" ],
-           [ enabled,            \&xst_network_interface_active,       IFACE,
+           [ "user",               \&xst_parse_trivial,                  0 ], # not supported.
+           [ "dev",                \&xst_parse_trivial,                  IFACE ],
+           [ "bootproto",          \&xst_network_deb22_parse_bootproto,  [INTERFACES, IFACE]],
+           [ "auto",               \&xst_parse_interfaces_option_kw_not, [INTERFACES, IFACE], "noauto" ],
+           [ "name",               \&xst_parse_interfaces_option_str,    [INTERFACES, IFACE], "name" ],
+           [ "address",            \&xst_parse_interfaces_option_str,    [INTERFACES, IFACE], "address" ],
+           [ "netmask",            \&xst_parse_interfaces_option_str,    [INTERFACES, IFACE], "netmask" ],
+           [ "broadcast",          \&xst_parse_interfaces_option_str,    [INTERFACES, IFACE], "broadcast" ],
+           [ "network",            \&xst_parse_interfaces_option_str,    [INTERFACES, IFACE], "network" ],
+           [ "gateway",            \&xst_parse_interfaces_option_str,    [INTERFACES, IFACE], "gateway" ],
+           [ "wvsection",          \&xst_parse_interfaces_option_str,    [INTERFACES, IFACE], "provider" ],
+           [ "peerdns",            \&xst_parse_kw,                       PPP_OPTIONS, "usepeerdns" ],
+           [ "dns1",               \&xst_parse_trivial,                  "" ], # not supported.
+           [ "dns2",               \&xst_parse_trivial,                  "" ], # not supported.
+           [ "mtu",                \&xst_parse_split_first_str,          PPP_OPTIONS, "mtu", "[ \t]+" ],
+           [ "mru",                \&xst_parse_split_first_str,          PPP_OPTIONS, "mru", "[ \t]+" ],
+           [ "remote_address",     \&xst_network_debian_parse_remote_address, [INTERFACES, IFACE]],
+           [ "login",              \&xst_parse_split_first_str,          PPP_OPTIONS, "user", "[ \t]+" ],
+           [ "password",           \&xst_network_get_pap_passwd,         PAP, "%login%" ],
+           [ "password",           \&xst_network_get_pap_passwd,         CHAP, "%login%" ],
+           [ "serial_port",        \&xst_network_get_ppp_options_re,     PPP_OPTIONS, "^(/dev/[^ \t]+)" ],
+           [ "serial_speed",       \&xst_network_get_ppp_options_re,     PPP_OPTIONS, "^([0-9]+)" ],
+           [ "ppp_options",        \&xst_network_get_ppp_options_unsup,  PPP_OPTIONS ],
+           [ "set_default_gw",     \&xst_parse_kw,                       PPP_OPTIONS, "defaultroute" ],
+           [ "debug",              \&xst_parse_kw,                       PPP_OPTIONS, "debug" ],
+           [ "persist",            \&xst_parse_kw,                       PPP_OPTIONS, "persist" ],
+           [ "serial_escapechars", \&xst_parse_split_first_str,          PPP_OPTIONS, "escape", "[ \t]+" ],
+           [ "serial_hwctl",       \&xst_parse_kw,                       PPP_OPTIONS, "crtscts" ],
+           [ "phone_number",       \&xst_parse_chat,                     CHAT, "^atd[^0-9]*([0-9, -]+)" ],
+           [ "enabled",            \&xst_network_interface_active,       IFACE,
                                                                        \&xst_network_active_interfaces_get ]
            ]
              }
@@ -1020,25 +1020,25 @@
         WVDIAL       => "/etc/wvdial.conf" },
 	    table =>
           [
-           [ auto,          \&xst_replace_sh_bool,          SYSCONFIG_NW, NETWORKING ],
-           [ forward,       \&xst_replace_sh_bool,          SYSCONFIG_NW, FORWARD_IPV4 ],
-           [ hostname,      \&xst_replace_sh,               SYSCONFIG_NW, HOSTNAME ],
-           [ hostname,      \&xst_network_run_hostname ],
-           [ gateway,       \&xst_replace_sh,               SYSCONFIG_NW, GATEWAY],
-           [ gateway_dev,   \&xst_replace_sh,               SYSCONFIG_NW, GATEWAYDEV],
-           [ domain,        \&xst_replace_sh,               SYSCONFIG_NW, DOMAIN],
-           [ nameserver,    \&xst_replace_join_all,         RESOLV_CONF,  nameserver, "[ \t]+" ],
-           [ searchdomain,  \&xst_replace_join_first_array, RESOLV_CONF,  search, "[ \t]+", "[ \t]+" ],
-           [ domainname,    \&xst_replace_join_first_str,   RESOLV_CONF,  domain, "[ \t]+" ],
-           [ order,         \&xst_replace_join_first_array, HOST_CONF,    order, "[ \t]+", "," ],
-           [ hostmatch,     \&xst_replace_join_first_bool,  HOST_CONF,    multi, "[ \t]+", "on", "off" ],
-           [ statichost,    \&xst_replace_join_hash,        HOSTS,        "[ \t]+", "[ \t]+" ],
-           [ workgroup,     \&xst_replace_ini,              SMB_CONF,     "global", "workgroup" ],     
-           [ description,   \&xst_replace_ini,              SMB_CONF,     "global", "server string" ],
-           [ winsserver,    \&xst_replace_ini,              SMB_CONF,     "global", "wins server" ],
-           [ winsuse,       \&xst_replace_ini_bool,         SMB_CONF,     "global", "wins support" ],
-           [ dialing,       \&xst_network_dialing_set,      WVDIAL ],
-           [ interface,     \&xst_network_interfaces_set,		OLD_HASH ]
+           [ "auto",          \&xst_replace_sh_bool,          SYSCONFIG_NW, NETWORKING ],
+           [ "forward",       \&xst_replace_sh_bool,          SYSCONFIG_NW, FORWARD_IPV4 ],
+           [ "hostname",      \&xst_replace_sh,               SYSCONFIG_NW, HOSTNAME ],
+           [ "hostname",      \&xst_network_run_hostname ],
+           [ "gateway",       \&xst_replace_sh,               SYSCONFIG_NW, GATEWAY],
+           [ "gateway_dev",   \&xst_replace_sh,               SYSCONFIG_NW, GATEWAYDEV],
+           [ "domain",        \&xst_replace_sh,               SYSCONFIG_NW, DOMAIN],
+           [ "nameserver",    \&xst_replace_join_all,         RESOLV_CONF,  "nameserver", "[ \t]+" ],
+           [ "searchdomain",  \&xst_replace_join_first_array, RESOLV_CONF,  "search", "[ \t]+", "[ \t]+" ],
+           [ "domainname",    \&xst_replace_join_first_str,   RESOLV_CONF,  "domain", "[ \t]+" ],
+           [ "order",         \&xst_replace_join_first_array, HOST_CONF,    "order", "[ \t]+", "," ],
+           [ "hostmatch",     \&xst_replace_join_first_bool,  HOST_CONF,    "multi", "[ \t]+", "on", "off" ],
+           [ "statichost",    \&xst_replace_join_hash,        HOSTS,        "[ \t]+", "[ \t]+" ],
+           [ "workgroup",     \&xst_replace_ini,              SMB_CONF,     "global", "workgroup" ],     
+           [ "description",   \&xst_replace_ini,              SMB_CONF,     "global", "server string" ],
+           [ "winsserver",    \&xst_replace_ini,              SMB_CONF,     "global", "wins server" ],
+           [ "winsuse",       \&xst_replace_ini_bool,         SMB_CONF,     "global", "wins support" ],
+           [ "dialing",       \&xst_network_dialing_set,      WVDIAL ],
+           [ "interface",     \&xst_network_interfaces_set,		OLD_HASH ]
            ]
              },
 
@@ -1056,22 +1056,22 @@
         WVDIAL      => "/etc/wvdial.conf" },
 	    table =>
           [
-           [ forward,       \&xst_replace_sh_bool,          OPTIONS,     ip_forward ],
-           [ hostname,      \&xst_replace_line_first,       HOSTNAME ],
-           [ hostname,      \&xst_network_run_hostname ],
-           [ domain,				\&xst_replace_join_first_str,   RESOLV_CONF, domain, "[ \t]+" ],
-           [ nameserver,    \&xst_replace_join_all,         RESOLV_CONF, nameserver, "[ \t]+" ],
-           [ searchdomain,  \&xst_replace_join_first_array, RESOLV_CONF, search, "[ \t]+", "[ \t]+" ],
-           [ domainname,    \&xst_replace_join_first_str,   RESOLV_CONF, domain, "[ \t]+" ],
-           [ order,         \&xst_replace_join_first_array, HOST_CONF,   order, "[ \t]+", "," ],
-           [ hostmatch,     \&xst_replace_join_first_bool,  HOST_CONF,   multi, "[ \t]+", "on", "off" ],
-           [ statichost,    \&xst_replace_join_hash,        HOSTS,       "[ \t]+", "[ \t]+" ],
-           [ workgroup,     \&xst_replace_ini,              SMB_CONF,    "global", "workgroup" ],     
-           [ description,   \&xst_replace_ini,              SMB_CONF,    "global", "server string" ],
-           [ winsserver,    \&xst_replace_ini,              SMB_CONF,    "global", "wins server" ],
-           [ winsuse,       \&xst_replace_ini_bool,         SMB_CONF,    "global", "wins support" ],
-           [ dialing,       \&xst_network_dialing_set,      WVDIAL ],
-           [ interface,     \&xst_network_interfaces_set,		OLD_HASH ]
+           [ "forward",       \&xst_replace_sh_bool,          OPTIONS,     "ip_forward" ],
+           [ "hostname",      \&xst_replace_line_first,       HOSTNAME ],
+           [ "hostname",      \&xst_network_run_hostname ],
+           [ "domain",				\&xst_replace_join_first_str,   RESOLV_CONF, "domain", "[ \t]+" ],
+           [ "nameserver",    \&xst_replace_join_all,         RESOLV_CONF, "nameserver", "[ \t]+" ],
+           [ "searchdomain",  \&xst_replace_join_first_array, RESOLV_CONF, "search", "[ \t]+", "[ \t]+" ],
+           [ "domainname",    \&xst_replace_join_first_str,   RESOLV_CONF, "domain", "[ \t]+" ],
+           [ "order",         \&xst_replace_join_first_array, HOST_CONF,   "order", "[ \t]+", "," ],
+           [ "hostmatch",     \&xst_replace_join_first_bool,  HOST_CONF,   "multi", "[ \t]+", "on", "off" ],
+           [ "statichost",    \&xst_replace_join_hash,        HOSTS,       "[ \t]+", "[ \t]+" ],
+           [ "workgroup",     \&xst_replace_ini,              SMB_CONF,    "global", "workgroup" ],     
+           [ "description",   \&xst_replace_ini,              SMB_CONF,    "global", "server string" ],
+           [ "winsserver",    \&xst_replace_ini,              SMB_CONF,    "global", "wins server" ],
+           [ "winsuse",       \&xst_replace_ini_bool,         SMB_CONF,    "global", "wins support" ],
+           [ "dialing",       \&xst_network_dialing_set,      WVDIAL ],
+           [ "interface",     \&xst_network_interfaces_set,		OLD_HASH ]
            ]
              }
 	  );
@@ -1110,33 +1110,33 @@
       },
       table =>
        [
-        [ bootproto,          \&xst_network_rh62_replace_bootproto, IFCFG, BOOTPROTO ],
-        [ auto,               \&xst_replace_sh_bool, IFCFG, ONBOOT ],
-        [ user,               \&xst_replace_sh_bool, IFCFG, USERCTL ],
-        [ name,               \&xst_replace_sh,      IFCFG, NAME ],
-        [ dev,                \&xst_replace_sh,      IFCFG, DEVICE ],
-        [ address,            \&xst_replace_sh,      IFCFG, IPADDR ],
-        [ netmask,            \&xst_replace_sh,      IFCFG, NETMASK ],
-        [ broadcast,          \&xst_replace_sh,      IFCFG, BROADCAST ],
-        [ network,            \&xst_replace_sh,      IFCFG, NETWORK ],
-        [ gateway,            \&xst_replace_sh,      IFCFG, GATEWAY ],
-        [ peerdns,            \&xst_replace_sh_bool, IFCFG, PEERDNS ],
-        [ dns1,               \&xst_replace_sh,      IFCFG, DNS1 ],
-        [ dns2,               \&xst_replace_sh,      IFCFG, DNS2 ],
-        [ mtu,                \&xst_replace_sh,      IFCFG, MTU ],
-        [ mru,                \&xst_replace_sh,      IFCFG, MRU ],
-        [ remote_address,     \&xst_replace_sh,      IFCFG, REMIP ],
-        [ login,              \&xst_replace_sh,      IFCFG, PAPNAME ],
-        [ serial_port,        \&xst_replace_sh,      IFCFG, MODEMPORT ],
-        [ serial_speed,       \&xst_replace_sh,      IFCFG, LINESPEED ],
-        [ ppp_options,        \&xst_replace_sh,      IFCFG, PPPOPTIONS ],
-        [ wvsection,          \&xst_replace_sh,      IFCFG, WVDIALSECT ],
-        [ set_default_gw,     \&xst_replace_sh_bool, IFCFG, DEFROUTE ],
-        [ debug,              \&xst_replace_sh_bool, IFCFG, DEBUG ],
-        [ persist,            \&xst_replace_sh_bool, IFCFG, PERSIST ],
-        [ serial_escapechars, \&xst_replace_sh_bool, IFCFG, ESCAPECHARS ],
-        [ serial_hwctl,       \&xst_replace_sh_bool, IFCFG, HARDFLOWCTL ],
-        [ phone_number,       \&xst_replace_chat,    CHAT,  "^atd[^0-9]*([0-9, -]+)" ]
+        [ "bootproto",          \&xst_network_rh62_replace_bootproto, IFCFG, BOOTPROTO ],
+        [ "auto",               \&xst_replace_sh_bool, IFCFG, ONBOOT ],
+        [ "user",               \&xst_replace_sh_bool, IFCFG, USERCTL ],
+        [ "name",               \&xst_replace_sh,      IFCFG, NAME ],
+        [ "dev",                \&xst_replace_sh,      IFCFG, DEVICE ],
+        [ "address",            \&xst_replace_sh,      IFCFG, IPADDR ],
+        [ "netmask",            \&xst_replace_sh,      IFCFG, NETMASK ],
+        [ "broadcast",          \&xst_replace_sh,      IFCFG, BROADCAST ],
+        [ "network",            \&xst_replace_sh,      IFCFG, NETWORK ],
+        [ "gateway",            \&xst_replace_sh,      IFCFG, GATEWAY ],
+        [ "peerdns",            \&xst_replace_sh_bool, IFCFG, PEERDNS ],
+        [ "dns1",               \&xst_replace_sh,      IFCFG, DNS1 ],
+        [ "dns2",               \&xst_replace_sh,      IFCFG, DNS2 ],
+        [ "mtu",                \&xst_replace_sh,      IFCFG, MTU ],
+        [ "mru",                \&xst_replace_sh,      IFCFG, MRU ],
+        [ "remote_address",     \&xst_replace_sh,      IFCFG, REMIP ],
+        [ "login",              \&xst_replace_sh,      IFCFG, PAPNAME ],
+        [ "serial_port",        \&xst_replace_sh,      IFCFG, MODEMPORT ],
+        [ "serial_speed",       \&xst_replace_sh,      IFCFG, LINESPEED ],
+        [ "ppp_options",        \&xst_replace_sh,      IFCFG, PPPOPTIONS ],
+        [ "wvsection",          \&xst_replace_sh,      IFCFG, WVDIALSECT ],
+        [ "set_default_gw",     \&xst_replace_sh_bool, IFCFG, DEFROUTE ],
+        [ "debug",              \&xst_replace_sh_bool, IFCFG, DEBUG ],
+        [ "persist",            \&xst_replace_sh_bool, IFCFG, PERSIST ],
+        [ "serial_escapechars", \&xst_replace_sh_bool, IFCFG, ESCAPECHARS ],
+        [ "serial_hwctl",       \&xst_replace_sh_bool, IFCFG, HARDFLOWCTL ],
+        [ "phone_number",       \&xst_replace_chat,    CHAT,  "^atd[^0-9]*([0-9, -]+)" ]
       ]
     },
     "debian-2.2" =>
@@ -1154,33 +1154,33 @@
         CHAP        => "/etc/ppp/chap-secrets" },
 	    table =>
           [
-# not sup  [ user,               \&xst_parse_sh_bool, IFCFG, USERCTL ],
-           [ bootproto,          \&xst_network_deb22_replace_bootproto,  [INTERFACES, IFACE]],
-           [ auto,               \&xst_replace_interfaces_option_kw_not, [INTERFACES, IFACE], noauto ],
-           [ name,               \&xst_replace_interfaces_option_str,    [INTERFACES, IFACE], name ],
-           [ address,            \&xst_replace_interfaces_option_str,    [INTERFACES, IFACE], address ],
-           [ netmask,            \&xst_replace_interfaces_option_str,    [INTERFACES, IFACE], netmask ],
-           [ broadcast,          \&xst_replace_interfaces_option_str,    [INTERFACES, IFACE], broadcast ],
-           [ network,            \&xst_replace_interfaces_option_str,    [INTERFACES, IFACE], network ],
-           [ gateway,            \&xst_replace_interfaces_option_str,    [INTERFACES, IFACE], gateway ],
-           [ wvsection,          \&xst_replace_interfaces_option_str,    [INTERFACES, IFACE], provider ],
-           [ peerdns,            \&xst_replace_kw,                       PPP_OPTIONS, usepeerdns ],
-# not sup  [ dns1,               \&xst_replace_sh,                       IFCFG,       DNS1 ],
-# not sup  [ dns2,               \&xst_replace_sh,                       IFCFG, DNS2 ],
-           [ mtu,                \&xst_replace_join_first_str,           PPP_OPTIONS, mtu, "[ \t]+" ],
-           [ mru,                \&xst_replace_join_first_str,           PPP_OPTIONS, mru, "[ \t]+" ],
-           [ remote_address,     \&xst_network_debian_replace_remote_address, [INTERFACES, IFACE]],
-           [ login,              \&xst_replace_join_first_str,           PPP_OPTIONS, user, "[ \t]+" ],
-           [ serial_port,        \&xst_network_set_ppp_options_re,       PPP_OPTIONS, "^(/dev/[^ \t]+)" ],
-           [ serial_speed,       \&xst_network_set_ppp_options_re,       PPP_OPTIONS, "^([0-9]+)" ],
-           [ wvsection,          \&xst_network_set_ppp_options_connect,  PPP_OPTIONS ],
-           [ ppp_options,        \&xst_network_set_ppp_options_unsup,    PPP_OPTIONS ],
-           [ set_default_gw,     \&xst_replace_kw,                       PPP_OPTIONS, defaultroute ],
-           [ debug,              \&xst_replace_kw,                       PPP_OPTIONS, debug ],
-           [ persist,            \&xst_replace_kw,                       PPP_OPTIONS, persist ],
-           [ serial_escapechars, \&xst_replace_join_first_str,           PPP_OPTIONS, escape, "[ \t]+" ],
-           [ serial_hwctl,       \&xst_replace_kw,                       PPP_OPTIONS, crtscts ],
-           [ phone_number,       \&xst_replace_chat,                     CHAT, "^atd[^0-9]*([0-9, -]+)" ],
+# not sup  [ "user",               \&xst_parse_sh_bool, IFCFG, USERCTL ],
+           [ "bootproto",          \&xst_network_deb22_replace_bootproto,  [INTERFACES, IFACE]],
+           [ "Auto",               \&xst_replace_interfaces_option_kw_not, [INTERFACES, IFACE], "noauto" ],
+           [ "name",               \&xst_replace_interfaces_option_str,    [INTERFACES, IFACE], "name" ],
+           [ "address",            \&xst_replace_interfaces_option_str,    [INTERFACES, IFACE], "address" ],
+           [ "netmask",            \&xst_replace_interfaces_option_str,    [INTERFACES, IFACE], "netmask" ],
+           [ "broadcast",          \&xst_replace_interfaces_option_str,    [INTERFACES, IFACE], "broadcast" ],
+           [ "network",            \&xst_replace_interfaces_option_str,    [INTERFACES, IFACE], "network" ],
+           [ "gateway",            \&xst_replace_interfaces_option_str,    [INTERFACES, IFACE], "gateway" ],
+           [ "wvsection",          \&xst_replace_interfaces_option_str,    [INTERFACES, IFACE], "provider" ],
+           [ "peerdns",            \&xst_replace_kw,                       PPP_OPTIONS, "usepeerdns" ],
+# not sup  [ "dns1",               \&xst_replace_sh,                       IFCFG,       DNS1 ],
+# not sup  [ "dns2",               \&xst_replace_sh,                       IFCFG, DNS2 ],
+           [ "mtu",                \&xst_replace_join_first_str,           PPP_OPTIONS, "mtu", "[ \t]+" ],
+           [ "mru",                \&xst_replace_join_first_str,           PPP_OPTIONS, "mru", "[ \t]+" ],
+           [ "remote_address",     \&xst_network_debian_replace_remote_address, [INTERFACES, IFACE]],
+           [ "login",              \&xst_replace_join_first_str,           PPP_OPTIONS, "user", "[ \t]+" ],
+           [ "serial_port",        \&xst_network_set_ppp_options_re,       PPP_OPTIONS, "^(/dev/[^ \t]+)" ],
+           [ "serial_speed",       \&xst_network_set_ppp_options_re,       PPP_OPTIONS, "^([0-9]+)" ],
+           [ "wvsection",          \&xst_network_set_ppp_options_connect,  PPP_OPTIONS ],
+           [ "ppp_options",        \&xst_network_set_ppp_options_unsup,    PPP_OPTIONS ],
+           [ "set_default_gw",     \&xst_replace_kw,                       PPP_OPTIONS, "defaultroute" ],
+           [ "debug",              \&xst_replace_kw,                       PPP_OPTIONS, "debug" ],
+           [ "persist",            \&xst_replace_kw,                       PPP_OPTIONS, "persist" ],
+           [ "serial_escapechars", \&xst_replace_join_first_str,           PPP_OPTIONS, "escape", "[ \t]+" ],
+           [ "serial_hwctl",       \&xst_replace_kw,                       PPP_OPTIONS, "crtscts" ],
+           [ "phone_number",       \&xst_replace_chat,                     CHAT, "^atd[^0-9]*([0-9, -]+)" ],
            ]
              }
   );
diff --exclude=CVS --exclude=Makefile.in -urN ximian-setup-tools.vanilla/backends/parse.pl.in ximian-setup-tools/backends/parse.pl.in
--- ximian-setup-tools.vanilla/backends/parse.pl.in	Tue Mar 20 00:23:13 2001
+++ ximian-setup-tools/backends/parse.pl.in	Wed Mar 21 19:59:07 2001
@@ -137,7 +137,7 @@
   $line = $$line;
 
   # This will put escaped hashes out of danger.
-  $line =~ s/([\"\'][^\#]*)\#([^\"\']*[\"\'])/\1__hash__\2/g;
+  $line =~ s/([\"\'][^\#]*)\#([^\"\']*[\"\'])/$1__hash__$2/g;
   $line =~ s/\\\#/__hash__/g;
 
   # Nuke everything after a hash.
@@ -292,7 +292,7 @@
   $ret =~ s/\\\'/\\_/g;
   $ret =~ s/\'//g;
   $ret =~ s/\\_/\'/g;
-  $ret =~ s/\\(.)/\1/g;
+  $ret =~ s/\\(.)/$1/g;
 
   return $ret;
 }
@@ -415,7 +415,7 @@
 sub xst_parse_ini_sections
 {
   my ($file) = @_;
-  my @sections, $line;
+  my (@sections, $line);
 
   $fd = &xst_open_read_from_names ($file);
   
diff --exclude=CVS --exclude=Makefile.in -urN ximian-setup-tools.vanilla/backends/replace.pl.in ximian-setup-tools/backends/replace.pl.in
--- ximian-setup-tools.vanilla/backends/replace.pl.in	Tue Mar 20 21:44:22 2001
+++ ximian-setup-tools/backends/replace.pl.in	Wed Mar 21 20:37:21 2001
@@ -64,7 +64,7 @@
 {
   $_ = $_[0];
 
-  s/\[([^^])([^\]])[^\]]*\]/\1/g;
+  s/\[([^^])([^\]])[^\]]*\]/$1/g;
   s/\+//g;
   s/\$//g;
   s/[^\*]\*//g;
@@ -98,9 +98,9 @@
 {
   my ($file, $key, $re, @value) = @_;
   my ($fd, @line, @res);
-  my $buff, $i;
-  my $pre_space, $post_comment;
-  my $line_key, $val;
+  my ($buff, $i);
+  my ($pre_space, $post_comment);
+  my ($line_key, $val);
 
   $buff = &xst_buffer_load ($file);
   
@@ -178,7 +178,7 @@
 {
   my ($file, $key, $value) = @_;
 
-  $value =~ s/([\"\'\`\&\$\|\*\?\[\]\{\}\(\)<>\\])/\\\1/g;
+  $value =~ s/([\"\'\`\&\$\|\*\?\[\]\{\}\(\)<>\\])/\\$1/g;
   $value = "\"$value\"" if ($value =~ /[ \t]/);
 
   return &xst_replace_split ($file, $key, "[ \t]*=[ \t]*", $value);
@@ -217,7 +217,7 @@
 sub xst_replace_join_hash
 {
   my ($file, $re1, $re2, $value) = @_;
-  my $i, $res, $tmp, $val;
+  my ($i, $res, $tmp, $val);
 
   $res = 0;
   
@@ -234,7 +234,7 @@
 sub xst_replace_chat
 {
   my ($file, $re, $value) = @_;
-  my $buff, $i, $bak, $found, $substr;
+  my ($buff, $i, $bak, $found, $substr);
 
   $buff = &xst_buffer_load ($file);
 
@@ -282,8 +282,8 @@
 sub xst_replace_ini
 {
   my ($file, $section, $var, $value) = @_;
-  my $buff, $i, $found_flag;
-  my $pre_space, $post_comment, $sec_save;
+  my ($buff, $i, $found_flag);
+  my ($pre_space, $post_comment, $sec_save);
 
   &xst_debug_print_string ("\nreplace_ini: " . join (',', @_) . "\n");
 
@@ -319,7 +319,7 @@
         
         if ($found_flag && $i =~ /^$var[ \t]*=/i)
         {
-          $i =~ s/^($var[ \t]*=[ \t]*).*/\1$value/i;
+          $i =~ s/^($var[ \t]*=[ \t]*).*/$1$value/i;
           $found_flag = 2;
         }
       }
@@ -354,7 +354,7 @@
 sub xst_replace_interfaces_get_next_stanza
 {
   my ($buff, $line_no) = @_;
-  my $i, $line;
+  my ($i, $line);
 
   while ($$line_no <= $#$buff)
   {
@@ -374,7 +374,7 @@
 sub xst_replace_interfaces_get_next_option
 {
   my ($buff, $line_no) = @_;
-  my $i, $line, $empty_lines;
+  my ($i, $line, $empty_lines);
 
   $empty_lines = 0;
   
@@ -441,7 +441,7 @@
 sub xst_replace_interfaces_stanza_delete
 {
   my ($file, $iface) = @_;
-  my $buff, $line_no, $stanza;
+  my ($buff, $line_no, $stanza);
 
   $buff = &xst_buffer_load ($file);
   &xst_buffer_join_lines ($buff);
@@ -464,8 +464,8 @@
 sub xst_replace_interface_stanza_value
 {
   my ($file, $iface, $pos, $value) = @_;
-  my $buff, $line_no, $stanza;
-  my $pre_space, $line, $line_arr;
+  my ($buff, $line_no, $stanza);
+  my ($pre_space, $line, $line_arr);
 
   $buff = &xst_buffer_load ($file);
   &xst_buffer_join_lines ($buff);
@@ -493,8 +493,8 @@
 sub xst_replace_interfaces_option_str
 {
   my ($file, $iface, $key, $value) = @_;
-  my $buff, $line_no, $stanza;
-  my $pre_space, $line, $line_arr;
+  my ($buff, $line_no, $stanza);
+  my ($pre_space, $line, $line_arr);
 
   $buff = &xst_buffer_load ($file);
   &xst_buffer_join_lines ($buff);
@@ -518,14 +518,14 @@
     else
     {
       chomp $$buff[$line_no];
-      $$buff[$line_no] =~ s/^([ \t]*$key[ \t]).*/\1/;
+      $$buff[$line_no] =~ s/^([ \t]*$key[ \t]).*/$1/;
     }
   }
   elsif ($value ne "")
   {
     $line_no --;
     chomp $$buff[$line_no];
-    $$buff[$line_no] =~ s/^([ \t]*)(.*)/\1\2\n\1$key /;
+    $$buff[$line_no] =~ s/^([ \t]*)(.*)/$1$2\n$1$key /;
   }
 
   $$buff[$line_no] .= $value . "\n" if $value ne "";
diff --exclude=CVS --exclude=Makefile.in -urN ximian-setup-tools.vanilla/backends/service.pl.in ximian-setup-tools/backends/service.pl.in
--- ximian-setup-tools.vanilla/backends/service.pl.in	Thu Mar  8 22:27:59 2001
+++ ximian-setup-tools/backends/service.pl.in	Wed Mar 21 20:02:49 2001
@@ -71,7 +71,7 @@
 sub xst_service_sysv_get_status
 {
   my ($service) = @_;
-  my $rc_path, $initd_path;
+  my ($rc_path, $initd_path);
 
   ($rcd_path, $initd_path) = &xst_service_sysv_get_paths ();
   
@@ -101,7 +101,7 @@
 sub xst_service_sysv_add_link
 {
   my ($runlevel, $pre, $service) = @_;
-  my $rcd_path, $initd_path;
+  my ($rcd_path, $initd_path);
 
   ($rcd_path, $initd_path) = &xst_service_sysv_get_paths ();
 
@@ -115,7 +115,7 @@
   local *RC_DIR;
   my $link;
   my $dir;
-  my $rcd_path, $initd_path;
+  my ($rcd_path, $initd_path);
 
   ($rcd_path, $initd_path) = &xst_service_sysv_get_paths ();
   $dir = "$xst_prefix/$rcd_path/rc$runlevel.d";
@@ -178,7 +178,7 @@
 sub xst_service_sysv_run_initd_script
 {
   my ($service, $arg) = @_;
-  my $rc_path, $initd_path;
+  my ($rc_path, $initd_path);
   my $str;
   my %map =
       ("restart" => "restarted",
diff --exclude=CVS --exclude=Makefile.in -urN ximian-setup-tools.vanilla/backends/time-conf.in ximian-setup-tools/backends/time-conf.in
--- ximian-setup-tools.vanilla/backends/time-conf.in	Tue Mar 13 16:48:00 2001
+++ ximian-setup-tools/backends/time-conf.in	Wed Mar 21 21:30:32 2001
@@ -67,7 +67,7 @@
 
 sub xml_parse
 {
-  my $tree, %hash;
+  my ($tree, %hash);
   
   # Scan XML to tree.
 
@@ -161,7 +161,8 @@
   my $h = $_[0];
   my @sync;
 
-  @scalar_keys = (timezone);
+  @scalar_keys = ("timezone");
+
   $sync = $$h{"sync"};
 
   &xst_xml_print_begin ();
@@ -246,7 +247,7 @@
 
 sub time_get_local_time
 {
-  my %h, $trash;
+  my (%h, $trash);
 
   ($h{"second"}, $h{"minute"}, $h{"hour"}, $h{"monthday"}, $h{"month"}, $h{"year"},
    $trash, $trash, $trash) = localtime (time);
@@ -383,10 +384,10 @@
          },
          table =>
              [
-              [local_time,  \&time_get_local_time],
-              [timezone,    \&time_get_rh62_zone, [LOCAL_TIME, ZONEINFO]],
-              [sync,        \&xst_parse_split_all_hash_comment, NTP_CONF, "server", "[ \t]+"],
-              [sync_active, \&xst_service_sysv_get_status, "xntpd"],
+              ["local_time",  \&time_get_local_time],
+              ["timezone",    \&time_get_rh62_zone, [LOCAL_TIME, ZONEINFO]],
+              ["sync",        \&xst_parse_split_all_hash_comment, NTP_CONF, "server", "[ \t]+"],
+              ["sync_active", \&xst_service_sysv_get_status, "xntpd"],
               ]
                 }
        );
@@ -421,10 +422,10 @@
          },
          table =>
              [
-              [local_time,  \&time_set_local_time],
-              [timezone,    \&time_set_rh62_zone, [LOCAL_TIME, ZONEINFO]],
-              [sync,        \&xst_replace_join_all, NTP_CONF, "server", "[ \t]+"],
-              [sync_active, \&xst_service_sysv_set_status, 90, "xntpd"],
+              ["local_time",  \&time_set_local_time],
+              ["timezone",    \&time_set_rh62_zone, [LOCAL_TIME, ZONEINFO]],
+              ["sync",        \&xst_replace_join_all, NTP_CONF, "server", "[ \t]+"],
+              ["sync_active", \&xst_service_sysv_set_status, 90, "xntpd"],
               ]
                 }
        );
diff --exclude=CVS --exclude=Makefile.in -urN ximian-setup-tools.vanilla/backends/util.pl.in ximian-setup-tools/backends/util.pl.in
--- ximian-setup-tools.vanilla/backends/util.pl.in	Sat Feb 24 16:42:26 2001
+++ ximian-setup-tools/backends/util.pl.in	Wed Mar 21 19:56:40 2001
@@ -124,9 +124,9 @@
 sub xst_util_struct_eq
 {
   my ($a1, $a2) = @_;
-  my $type1, $type2;
-  my @keys1, @keys2;
-  my $elem1, $elem2;
+  my ($type1, $type2);
+  my (@keys1, @keys2);
+  my ($elem1, $elem2);
   my $i;
 
   $type1 = ref $a1;
@@ -244,13 +244,13 @@
   my @ip_reg1;
   my @ip_reg2;
 
-  @ip_reg1 = (@_[0] =~ /([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/);
-  @ip_reg2 = (@_[1] =~ /([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/);
+  @ip_reg1 = ($_[0] =~ /([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/);
+  @ip_reg2 = ($_[1] =~ /([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/);
 
-  @ip_reg1[0] = (@ip_reg1[0] * 1) & (@ip_reg2[0] * 1);
-  @ip_reg1[1] = (@ip_reg1[1] * 1) & (@ip_reg2[1] * 1);
-  @ip_reg1[2] = (@ip_reg1[2] * 1) & (@ip_reg2[2] * 1);
-  @ip_reg1[3] = (@ip_reg1[3] * 1) & (@ip_reg2[3] * 1);
+  $ip_reg1[0] = ($ip_reg1[0] * 1) & ($ip_reg2[0] * 1);
+  $ip_reg1[1] = ($ip_reg1[1] * 1) & ($ip_reg2[1] * 1);
+  $ip_reg1[2] = ($ip_reg1[2] * 1) & ($ip_reg2[2] * 1);
+  $ip_reg1[3] = ($ip_reg1[3] * 1) & ($ip_reg2[3] * 1);
 
   return join ('.', @ip_reg1);
 }
@@ -265,15 +265,15 @@
   my @ip_reg1;
   my @ip_reg2;
   
-  @ip_reg1 = (@_[0] =~ /([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/);
-  @ip_reg2 = (@_[1] =~ /([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/);
+  @ip_reg1 = ($_[0] =~ /([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/);
+  @ip_reg2 = ($_[1] =~ /([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/);
  
   @ip_reg1 = ($cf_hostip =~ /([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/);
 
-  @ip_reg1[0] = (@ip_reg1[0] * 1) | (~(@ip_reg2[0] * 1) & 255);
-  @ip_reg1[1] = (@ip_reg1[1] * 1) | (~(@ip_reg2[1] * 1) & 255);
-  @ip_reg1[2] = (@ip_reg1[2] * 1) | (~(@ip_reg2[2] * 1) & 255);
-  @ip_reg1[3] = (@ip_reg1[3] * 1) | (~(@ip_reg2[3] * 1) & 255);
+  $ip_reg1[0] = ($ip_reg1[0] * 1) | (~($ip_reg2[0] * 1) & 255);
+  $ip_reg1[1] = ($ip_reg1[1] * 1) | (~($ip_reg2[1] * 1) & 255);
+  $ip_reg1[2] = ($ip_reg1[2] * 1) | (~($ip_reg2[2] * 1) & 255);
+  $ip_reg1[3] = ($ip_reg1[3] * 1) | (~($ip_reg2[3] * 1) & 255);
   
   return join ('.', @ip_reg1);
 }
diff --exclude=CVS --exclude=Makefile.in -urN ximian-setup-tools.vanilla/backends/xml.pl.in ximian-setup-tools/backends/xml.pl.in
--- ximian-setup-tools.vanilla/backends/xml.pl.in	Tue Mar 20 19:20:27 2001
+++ ximian-setup-tools/backends/xml.pl.in	Wed Mar 21 20:04:53 2001
@@ -84,7 +84,7 @@
 sub xst_xml_print_string
 {
   print $_[0];
-  &xst_debug_print_string_to_file ("out.xml", @_[0]);
+  &xst_debug_print_string_to_file ("out.xml", $_[0]);
 }
 
 sub xst_xml_format_indent
@@ -162,7 +162,7 @@
 sub xst_xml_print_scalars
 {
   my ($h, @scalar_keys) = @_;
-  my $i, $val;
+  my ($i, $val);
 
   while ($i = shift @scalar_keys)
   {
@@ -176,7 +176,7 @@
 sub xst_xml_print_arrays
 {
   my ($h, @array_keys) = @_;
-  my $i, $j, $val;
+  my ($i, $j, $val);
   
   foreach $i (@array_keys)
   {
@@ -197,7 +197,7 @@
 sub xst_xml_print_hash
 {
   my ($hash, $tag) = @_;
-  my $j, $val;
+  my ($j, $val);
   
   &xst_xml_print_vspace ();
   &xst_xml_print_line ("<$tag>\n");
@@ -382,7 +382,7 @@
 
   #print STDERR "INI U: $ret\n";
   
-  for ($i = 0; @xst_xml_entities[$i] ne undef; $i += 2)
+  for ($i = 0; $xst_xml_entities[$i] ne undef; $i += 2)
   {
     $ret =~ s/$xst_xml_entities[$i]/$xst_xml_entities[$i + 1]/g;
   }


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