]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 346545: checksetup should show the name and version of the OS it's being run on
authormkanat%bugzilla.org <>
Tue, 1 Aug 2006 05:26:00 +0000 (05:26 +0000)
committermkanat%bugzilla.org <>
Tue, 1 Aug 2006 05:26:00 +0000 (05:26 +0000)
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> (module owner) r=colin, a=myk

checksetup.pl

index a9cb775143d328684563511b0fbfc99907b05627..889b363afee33e26024588d7fb6396fbe04be140 100755 (executable)
@@ -224,6 +224,7 @@ use 5.008;
 use File::Basename;
 use Getopt::Long qw(:config bundling);
 use Pod::Usage;
+use POSIX ();
 use Safe;
 
 BEGIN { chdir dirname($0); }
@@ -269,8 +270,19 @@ our %answer = %{read_answers_file()};
 my $silent = scalar(keys %answer) && !$switch{'verbose'};
 
 # Display version information
-printf "\n*** This is Bugzilla " . BUGZILLA_VERSION . " on perl %vd ***\n", 
-    $^V unless $silent;
+unless ($silent) {
+    printf "\n* This is Bugzilla " . BUGZILLA_VERSION . " on perl %vd\n",
+           $^V;
+    my @os_details = POSIX::uname;
+    # 0 is the name of the OS, 2 is the major version,
+    my $os_name = $os_details[0] . ' ' . $os_details[2];
+    if (ON_WINDOWS) {
+        require Win32;
+        $os_name = Win32::GetOSName();
+    }
+    # 3 is the minor version.
+    print "* Running on $os_name $os_details[3]\n"
+}
 
 # Check required --MODULES--
 my $module_results = check_requirements(!$silent);