aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2009-05-09 20:43:55 +0100
committerAvatar David Leverton <levertond@googlemail.com> 2009-05-09 20:43:55 +0100
commitb40beb9fb8b6dcbae617f0b6b87a752f684955c4 (patch)
tree01b72617e868b42135a92e84fdf54828dd8c4c92
parent5781fcfd14387a23502adccef865d861447d4c16 (diff)
downloadpaludis-b40beb9fb8b6dcbae617f0b6b87a752f684955c4.tar.gz
paludis-b40beb9fb8b6dcbae617f0b6b87a752f684955c4.tar.xz
Add uname output
-rw-r--r--src/clients/paludis/info.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/clients/paludis/info.cc b/src/clients/paludis/info.cc
index 1596e3b..3019f0e 100644
--- a/src/clients/paludis/info.cc
+++ b/src/clients/paludis/info.cc
@@ -26,6 +26,7 @@
#include <paludis/util/sequence.hh>
#include <paludis/util/simple_visitor_cast.hh>
#include <paludis/util/make_named_values.hh>
+#include <paludis/util/system.hh>
#include <paludis/package_database.hh>
#include <paludis/environment.hh>
#include <paludis/package_id.hh>
@@ -47,6 +48,7 @@
using namespace paludis;
using std::endl;
+using std::flush;
using std::cout;
namespace
@@ -312,6 +314,15 @@ do_info(const std::tr1::shared_ptr<const Environment> & env)
cout << endl;
+ cout << colour(cl_heading, "System:") << endl;
+ cout << " " << flush;
+ int status(run_command(Command("uname -a")));
+ if (0 != status)
+ Log::get_instance()->message("info.uname.failure", ll_warning, lc_context)
+ << "uname -a failed with status " << status;
+
+ cout << endl;
+
cout << colour(cl_heading, "Reduced Privs:") << endl;
cout << " " << std::setw(26) << std::left << "reduced_uid:" << std::setw(0) << " "
<< env->reduced_uid() << endl;