Changeset

9826:bdc2a024933b

prosodyctl: about: Report the current operating system according to uname
author Kim Alvefur <zash@zash.se>
date Sat, 08 Dec 2018 18:02:56 +0100
parents 9825:5ccce16c6449
children 9829:fdc42f685557
files prosodyctl
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/prosodyctl	Sat Feb 09 20:54:35 2019 +0100
+++ b/prosodyctl	Sat Dec 08 18:02:56 2018 +0100
@@ -363,6 +363,13 @@
 				.."\n  ";
 		end)));
 	print("");
+	local have_pposix, pposix = pcall(require, "util.pposix");
+	if have_pposix and pposix.uname then
+		print("# Operating system");
+		local uname, err = pposix.uname();
+		print(uname and uname.sysname .. " " .. uname.release or "Unknown POSIX", err or "");
+		print("");
+	end
 	print("# Lua environment");
 	print("Lua version:             ", _G._VERSION);
 	print("");