[system-tools] PATCH: Support for Yoper Linux 2.1 and 2.2 for network backend



Hi,

Here is a patch to add support to the network backend for Yoper Linux 2.1 and 
2.2. The patch is made by me but tested by the Yoper Linux team. It's against 
HEAD from 07-01-2005. Also attached is Yoper Linux logo.

Cheers,
-- 
Juan Luis Baptiste
http://www.merlinux.org
http://knetworkconf.sf.net
? ubuntu-5.04.diff
? yoper-2.1.0-2.2.0.diff
? yoper-2.1.0.diff
Index: network-conf.in
===================================================================
RCS file: /cvs/system-tools-backends/system-tools-backends/network-conf.in,v
retrieving revision 1.114
diff -u -3 -p -r1.114 network-conf.in
--- network-conf.in	29 Jun 2005 22:35:20 -0000	1.114
+++ network-conf.in	2 Jul 2005 03:35:17 -0000
@@ -70,7 +70,7 @@ $version = "@VERSION@";
               "debian-2.2", "debian-3.0", "debian-sarge",
 	      "ubuntu-5.04",
               "suse-7.0", "suse-9.0", "suse-9.1",
-              "turbolinux-7.0", "fedora-1", "fedora-2", "fedora-3", "specifix",
+              "turbolinux-7.0", "fedora-1", "fedora-2", "fedora-3", "specifix", "yoper-2.1", "yoper-2.2",
               "pld-1.0", "pld-1.1", "pld-1.99",
               "conectiva-9", "conectiva-10",
               "vine-3.0", "vine-3.1",
Index: network.pl.in
===================================================================
RCS file: /cvs/system-tools-backends/system-tools-backends/network.pl.in,v
retrieving revision 1.203
diff -u -3 -p -r1.203 network.pl.in
--- network.pl.in	29 Jun 2005 22:35:20 -0000	1.203
+++ network.pl.in	2 Jul 2005 03:35:20 -0000
@@ -512,6 +512,8 @@ sub gst_network_get_broadcast_ping_cmd
        "fedora-1"     => "redhat-6.2",
        "fedora-2"     => "redhat-6.2",
        "fedora-3"     => "redhat-6.2",
+       "yoper-2.1"     => "redhat-6.2",
+       "yoper-2.2"     => "redhat-6.2",       
        "specifix"     => "redhat-6.2",
        "vine-3.0"     => "redhat-6.2",
        "vine-3.1"     => "redhat-6.2",
@@ -1794,6 +1796,8 @@ sub gst_network_get_file
     "fedora-1"     => \&gst_network_rh72_get_file,
     "fedora-2"     => \&gst_network_rh72_get_file,
     "fedora-3"     => \&gst_network_rh72_get_file,
+    "yoper-2.1"     => \&gst_network_rh72_get_file,
+    "yoper-2.2"     => \&gst_network_rh72_get_file,
     "specifix"     => \&gst_network_rh72_get_file,
     "vine-3.0"     => \&gst_network_rh62_get_file,
     "vine-3.1"     => \&gst_network_rh62_get_file,
@@ -3881,6 +3885,8 @@ sub gst_network_ensure_loopback_interfac
     "fedora-1"     => "",
     "fedora-2"     => "",
     "fedora-3"     => "",
+    "yoper-2.1"     => "",
+    "yoper-2.2"     => "",
     "specifix"     => "",
     "vine-3.0"     => "lo",
     "vine-3.1"     => "lo",
@@ -4009,6 +4015,8 @@ sub gst_network_get_parse_table
     "fedora-1"     => "redhat-7.2",
     "fedora-2"     => "redhat-7.2",
     "fedora-3"     => "redhat-7.2",
+    "yoper-2.1"     => "redhat-7.2",
+    "yoper-2.2"     => "redhat-7.2",
     "specifix"     => "redhat-7.2",
     "vine-3.0"     => "redhat-7.0",
     "vine-3.1"     => "redhat-7.0",
@@ -4452,6 +4460,8 @@ sub gst_network_get_interface_parse_tabl
     "fedora-1"     => "redhat-7.2",
     "fedora-2"     => "redhat-7.2",
     "fedora-3"     => "redhat-7.2",
+    "yoper-2.1"     => "redhat-7.2",    
+    "yoper-2.2"     => "redhat-7.2",    
     "specifix"     => "redhat-7.2",
     "vine-3.0"     => "vine-3.0",
     "vine-3.1"     => "vine-3.0",
@@ -5326,6 +5336,8 @@ sub gst_network_get_replace_table
     "fedora-1"     => "redhat-7.2",
     "fedora-2"     => "redhat-7.2",
     "fedora-3"     => "redhat-7.2",
+    "yoper-2.1"     => "redhat-7.2",
+    "yoper-2.2"     => "redhat-7.2",
     "specifix"     => "redhat-7.2",
     "vine-3.0"     => "redhat-7.0",
     "vine-3.1"     => "redhat-7.0",
@@ -5756,6 +5768,8 @@ sub gst_network_get_interface_replace_ta
     "fedora-1"     => "redhat-7.2",
     "fedora-2"     => "redhat-7.2",
     "fedora-3"     => "redhat-7.2",
+    "yoper-2.1"    => "redhat-7.2",
+    "yoper-2.2"    => "redhat-7.2",
     "specifix"     => "redhat-7.2",
     "vine-3.0"     => "vine-3.0",
     "vine-3.1"     => "vine-3.0",
Index: platform.pl.in
===================================================================
RCS file: /cvs/system-tools-backends/system-tools-backends/platform.pl.in,v
retrieving revision 1.71
diff -u -3 -p -r1.71 platform.pl.in
--- platform.pl.in	29 Jun 2005 22:35:20 -0000	1.71
+++ platform.pl.in	2 Jul 2005 03:35:22 -0000
@@ -88,6 +88,8 @@ $PLATFORM_INFO = {
   "fedora-1"        => "Fedora Core 1 (Yarrow)",
   "fedora-2"        => "Fedora Core 2 (Tettnang)",
   "fedora-3"        => "Fedora Core 3 (Heidelberg)",
+  "yoper-2.1"       => "Yoper Linux  2.1 (for i686)",
+  "yoper-2.2"       => "Yoper Linux  2.2 (for i686)",  
   "specifix"        => "Specifix Linux",
 };
   
@@ -261,6 +263,25 @@ sub check_fedora
     return -1;
 }
 
+sub check_yoper
+{
+    open YOPER, "$gst_prefix/etc/yoper-release" or return -1;
+    while (<YOPER>)
+    {
+      $ver = $_;
+      chomp ($ver);
+
+      if ($ver =~ /^Yoper Linux (\S+)/)
+      {
+        close YOPER;
+        return "yoper-$1";
+      }
+    }
+
+    close YOPER;
+    return -1;
+}
+
 sub check_specifix
 {
   open SPECIFIX, "$gst_prefix/etc/distro-release" or return -1;
@@ -477,7 +498,7 @@ sub gst_platform_guess
   my %check = (
     # Red Hat check must run after Vine, Mandrake and Fedora, and Mandrake after BlackPanther
     "Linux" => [ \&check_lsb,      \&check_debian,   \&check_caldera, \&check_suse, \&check_blackpanther, \&check_vine,
-                 \&check_fedora, \&check_mandrake, \&check_conectiva, \&check_linuxppc, \&check_redhat,  \&check_openna,
+                 \&check_fedora, \&check_yoper, \&check_mandrake, \&check_conectiva, \&check_linuxppc, \&check_redhat,  \&check_openna,
                  \&check_turbolinux, \&check_slackware, \&check_vlos, \&check_gentoo, \&check_pld, \&check_specifix, \&check_archlinux ],
     "FreeBSD" => [ \&check_freebsd ],
     "SunOS"    => [ \&check_solaris ]
Index: service.pl.in
===================================================================
RCS file: /cvs/system-tools-backends/system-tools-backends/service.pl.in,v
retrieving revision 1.88
diff -u -3 -p -r1.88 service.pl.in
--- service.pl.in	29 Jun 2005 22:35:20 -0000	1.88
+++ service.pl.in	2 Jul 2005 03:35:23 -0000
@@ -91,6 +91,9 @@ sub gst_service_sysv_get_paths
        "fedora-1"     => ["$gst_prefix/etc/rc.d", "$gst_prefix/etc/rc.d/init.d", "../init.d"],
        "fedora-2"     => ["$gst_prefix/etc/rc.d", "$gst_prefix/etc/rc.d/init.d", "../init.d"],
        "fedora-3"     => ["$gst_prefix/etc/rc.d", "$gst_prefix/etc/rc.d/init.d", "../init.d"],
+       
+       "yoper-2.1"    => ["$gst_prefix/etc/rc.d", "$gst_prefix/etc/rc.d/init.d", "../init.d"],
+       "yoper-2.2"    => ["$gst_prefix/etc/rc.d", "$gst_prefix/etc/rc.d/init.d", "../init.d"],
 
        "specifix"     => ["$gst_prefix/etc/rc.d", "$gst_prefix/etc/rc.d/init.d", "../init.d"],
 
@@ -153,6 +156,9 @@ sub gst_service_sysv_get_runlevels
        "fedora-1"       => [3, 5],
        "fedora-2"       => [3, 5],
        "fedora-3"       => [3, 5],
+       
+       "yoper-2.1"      => [3, 5],
+       "yoper-2.2"      => [3, 5],
 
        "specifix"       => [3, 5],
        
@@ -213,6 +219,9 @@ sub gst_service_get_verbose_runlevels
      "fedora-2"       => "redhat-5.2",
      "fedora-3"       => "redhat-5.2",
 
+     "yoper-2.1"       => "redhat-5.2",
+     "yoper-2.2"       => "redhat-5.2",
+     
      "specifix"       => "redhat-5.2",
 
      "vine-3.0"       => "redhat-5.2",
@@ -1597,6 +1606,8 @@ sub gst_service_get_status
        "fedora-1"     => \&gst_service_redhat_get_status,
        "fedora-2"     => \&gst_service_redhat_get_status,
        "fedora-3"     => \&gst_service_redhat_get_status,
+       "yoper-2.1"    => \&gst_service_redhat_get_status,
+       "yoper-2.2"    => \&gst_service_redhat_get_status,       
        "specifix"     => \&gst_service_redhat_get_status,
 
        "suse-9.0"     => \&gst_service_suse_get_status,

Attachment: Ybutton.gif
Description: GIF image



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