summaryrefslogtreecommitdiffstats
path: root/checksetup.pl
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2006-08-01 07:26:00 +0200
committermkanat%bugzilla.org <>2006-08-01 07:26:00 +0200
commite47049d74ad1dc7ee5c54336756b9c30bae16cf4 (patch)
tree4cbcca3e41180e18c819b7081b84f896441a2b4f /checksetup.pl
parenta5172adf10d1e820f5099e78e6b967f0b019936b (diff)
downloadbugzilla-e47049d74ad1dc7ee5c54336756b9c30bae16cf4.tar.gz
bugzilla-e47049d74ad1dc7ee5c54336756b9c30bae16cf4.tar.xz
Bug 346545: checksetup should show the name and version of the OS it's being run on
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> (module owner) r=colin, a=myk
Diffstat (limited to 'checksetup.pl')
-rwxr-xr-xchecksetup.pl16
1 files changed, 14 insertions, 2 deletions
diff --git a/checksetup.pl b/checksetup.pl
index a9cb77514..889b363af 100755
--- a/checksetup.pl
+++ b/checksetup.pl
@@ -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);