[Setup-tool-hackers] sun-support




I want to put some effort in getting xst running on sun-solaris for at least
the tools I'm working on myself: package-conf.in and (not in cvs)
system-conf.in.  To get the tools at least running the script platform.pl.in
file must be updated, which I somehow did.  Somehow because I only know 1
way of checking the installed solaris version which is via uname.  Is there a
better way?  Awaiting your advice I now put in function that is checking the
version of an sun system "return solaris-2.6", see attached patch.

--
Richard Bos
For those who have no (/)home the journey is endless
--- platform.pl.in.20010607	Thu Jun  7 23:36:20 2001
+++ platform.pl.in	Thu Jun  7 23:44:37 2001
@@ -170,6 +170,11 @@ sub check_freebsd
   return -1;
 }
 
+sub check_sunsolaris
+{
+  return "solaris-2.6";
+}
+
 sub xst_platform_guess
 {
   my $dir = "___scriptsdir___";
@@ -206,7 +211,8 @@ sub xst_platform_guess
   {
     # Red Hat check must run after Mandrake
     my @checks = (\&check_lsb, \&check_debian, \&check_caldera, \&check_suse, 
-                  \&check_mandrake, \&check_linuxppc, \&check_redhat, \&check_turbolinux);
+                  \&check_mandrake, \&check_linuxppc, \&check_redhat,
+                  \&check_turbolinux, \&check_sunsolaris);
     my ($check, $dist);
 
     foreach $check (@checks)
@@ -218,8 +224,6 @@ sub xst_platform_guess
         return;
       }
     }
-
-    $xst_dist = "unknown";
   }
 
   if ($xst_system =~ /freebsdelf/)
@@ -231,9 +235,20 @@ sub xst_platform_guess
       $xst_dist = $dist;
       return;
     }
+  }
 
-    $xst_dist = "unknown";
+  if ($xst_system =~ /sun-solaris/)
+  {
+    my $dist;
+
+    $dist = &check_sunsolaris ();
+    if ($dist != -1) {
+      $xst_dist = $dist;
+      return;
   }
+  }
+
+  $xst_dist = "unknown";
 }
 
 


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